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


Joined: 07 Dec 2001
Posts: 2

PostPosted: Fri Dec 07, 2001 7:22 pm   

Varying variables
 
Wondering if anyone could help me with this problem..
for my status line the experience is placed into a variable, XpBase, now another trigger/program I have needs everything after the 10000 mark (example- 123456 Xp, Need the 12, and nothing else) but when i tried to divide Xpbase by 10000 (which would actually make it 12.3456) instead of preforming the division it simply gave me 123456/10000

the code as i have it-
(its under a status-line trigger which displays at ever carrage, rest of the status line works though and Xpbase works fine)

#var Xpdivided {Xpbase/10000}

Also on a side note, how do you "Gag" lines on the screen (to stop them from displaying on the screen, but would display in a log)
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Fri Dec 07, 2001 8:16 pm   
 
zMUD won't perform math unless you tell it to.

Use the #MATH command:

#MATH Xpdivided (@Xpbase/10000)

Alternatively, use the %eval function:

#VAR Xpdivided %eval(@Xpbase/10000)

Either way will do the job.

Troubadour
Reply with quote
Dragonfire
Newbie


Joined: 07 Dec 2001
Posts: 2

PostPosted: Fri Dec 07, 2001 9:51 pm   
 
thanks alot man, help file showed an extra space in there.. oh well
now.. just to find out how to gag it from the display(the prompt) but yet still trigger things from it..
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