Greetings,
I've been messing around with arrays for a little bit and wanted to create a little script that would hold the value of slain things. However, when I try to do it I get one of those "You're trying to add a number to a nil value, you dummy!" messages.
More or less, I'm trying for something like this:
Trigger: You have slain thingeh.
A script will look for an entry called "thingeh" in the array called "slain". If it is there already, the script will add 1 to it. If it isn't, the script will add a new entry to the array called "thingeh" and set the value to the number 0 (not a string).
I've been at this for hours. Help?
I've been messing around with arrays for a little bit and wanted to create a little script that would hold the value of slain things. However, when I try to do it I get one of those "You're trying to add a number to a nil value, you dummy!" messages.
More or less, I'm trying for something like this:
Trigger: You have slain thingeh.
A script will look for an entry called "thingeh" in the array called "slain". If it is there already, the script will add 1 to it. If it isn't, the script will add a new entry to the array called "thingeh" and set the value to the number 0 (not a string).
I've been at this for hours. Help?