 |
Rogdorsh Newbie
Joined: 04 Mar 2002 Posts: 1
|
Posted: Sat Mar 16, 2002 4:56 pm
variables [floating point] |
What's the recommended way to deal with these? In a trigger that I have, @hasweight is something like 0.3 and I can't get that into the database as a number so I thought I'd multiply it by 10, but I'm out of luck =/. Ie:
quote:
#math @foo @hasweight*10
#ECHO |@foo|
... isn't doing much for me, what should I do, typecast it or something? =) |
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Mar 16, 2002 9:24 pm |
The public version of zMUD can't deal with floating-point numbers. The beta version has support for it and Zugg is working on fixing bugs in it so that there will be another public version soon.
Meanwhile, the only way to handle it would be to store only the numbers and know that what you have stored in there is really the variable divided by 10 (although this will return zero so you can't do that directly). To store only the numbers you can do:
#VAR hasweight %replace(@hasweight, ".", "")
Kjata |
|
|
 |
Rogdorsh Newbie
Joined: 04 Mar 2002 Posts: 1
|
Posted: Sun Mar 17, 2002 1:10 am |
Ahhhhhh, many thanks, appreciated
|
|
|
 |
|
|
|
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
|
|