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
deathbunny
Newbie


Joined: 02 Oct 2002
Posts: 2
Location: USA

PostPosted: Wed Oct 02, 2002 8:09 pm   

#math is totally screwed?
 
I haven't seen any other posts in the forum regarding this problem, so I gather everyone else's #math command is working fine? Mine (using the trial of version 6.16) refuses to perform even the most basic of variable calculations. Example: with a value of 1322 in @maxmana, I enter

#math temp (@maxmana - 1);#say @maxmana - 1 is @temp

at the command line. Obviously, I expect to get "1322 - 1 is 1321" but I don't. Instead, I get

1322 - 1 is 0

which means, I believe, that the command isn't doing the math at all or it isn't storing the result in @temp. Either way, #math is worthless, and it's pretty important for a lot of the triggers I'm trying to write.

Help?

Oh, and I've tried the above test command (and more useful attempts in my actual triggers) with parentheses as shown, with braces, and with nothing at all surrounding the calculation. All give the same result.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Oct 02, 2002 9:03 pm   
 
Hmm, tha's strange. In that case, you might want to try this instead:
#VAR temp %eval(@maxmana - 1)

Kjata
Reply with quote
deathbunny
Newbie


Joined: 02 Oct 2002
Posts: 2
Location: USA

PostPosted: Wed Oct 02, 2002 10:43 pm   
 
Well, I have no idea why that works and #math doesn't, but it did work-- thanks very much!
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