Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: 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
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
Humpton
Apprentice


Joined: 10 Oct 2000
Posts: 158
Location: Chicago, IL

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net