 |
Troubadour GURU
Joined: 14 Oct 2000 Posts: 556 Location: USA
|
Posted: Thu Mar 21, 2002 7:06 pm
Problem with script, please advise |
Your script snippet as written is correct. One thing that happened to me when I was looking at it is when I entered the script via the command line, the line numofarrows = [@numofarrows+20] was evaluated as numofarrows = 40 (i had initiated @numofarrows as 20.) So check that what's in the settings editor is what you entered at the command line.
If you can't find the cause use #ADD numofarrows 20 instead.
Troubadour  |
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Mar 21, 2002 11:29 pm |
Maybe the "Use [] for evaluation" or whatever it is in preferences is turned off?
li'l shmoe of Dragon's Gate MUD |
|
|
|
 |
Humpton Apprentice

Joined: 10 Oct 2000 Posts: 158 Location: Chicago, IL
|
Posted: Thu Mar 21, 2002 11:46 pm |
Doesn't the [] evaluate at the time it is entered and stores the answer, in your case 20? Which means you have the expression num = 20
What happens if you don't put the [] and just have num = num + 20?
I'm not sure, because I've always used #MATH, or #VAR rather than your way. So my way would be #MATH num @num + 20 and I've never had to consider []s.
Stay JOLLY!
H
___
Humpton lives like he types.... fast, and full of mistakes!
Core 2651: For those who prefer the future to the past. |
|
|
|
 |
|
|
|