My player mobs have the following list
list/skills
This list contains skill names and associated level values
ex: skills["Melee Combat"] = 4
I'm trying to set up a verb that will add a skill to a player and deduct an appropriate number of points from the player. Here's where it gets fun. The cost varies depending on the 'setting'. For example, combat skills are more expensive in high action settings, and gun combat does not exist in medieval settings. Currently, I'm attempting to use a master list of skills with two elements:
list/skills_list[15][8] (15 skills, 8 settings)
Each skill (1-15) is set to a skill name ("Melee Attack" for example) and I want to put eight different values in the second element (the different point costs).
This is later reference when deciding whether a player has enough points to purchase the skill, and how many points to deduct (skill level * cost).
I tried it this way:
skills_list += "Melee Attack" skills_list["Melee Attack"][1] =
It compiled alright, but I got wierd errors during character creation (where the lists are intialized):
runtime error: cannot write to indexed value in this type of list proc name: CreateCharacter (/mob/creating_character/proc/CreateCharacter) source file: BESM.dm,375 usr: the sapphiremagus (/mob/creating_character) src: the sapphiremagus (/mob/creating_character) call stack: the sapphiremagus (/mob/creating_character): CreateCharacter() the sapphiremagus (/mob/creating_character): Login()
I'd greatly appreciate any help on how to go about this =)
Thanks in advance
Well, first off you shouldn't need the first line. What you probably want to do, though, is this:
skills_list["Melee Attack"]=list(attack value 1, attack value 2, ....)
Accessing the list may be tricky, so in most cases I'd try code like this:
Lummox JR