|
Dragonfire Newbie
Joined: 07 Dec 2001 Posts: 2
|
Posted: 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) |
|
|
|
Troubadour GURU
Joined: 14 Oct 2000 Posts: 556 Location: USA
|
Posted: 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 |
|
|
|
Dragonfire Newbie
Joined: 07 Dec 2001 Posts: 2
|
Posted: 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.. |
|
|
|
|
|