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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 174

PostPosted: Sun Jul 17, 2022 4:31 am   

#math issues on flaoting numbers in a variable
 
#math gxptime %float(@gxprds*2/60/60)


oof, im trying to get this to work, and for the life of me i cannot.. please help?
i need it to create the variable gxptime and return the 0.00 of the equation... so far all i get is 0...:|

the numbers are:
54777/63 = gxprds
thanks in advance!
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 174

PostPosted: Sun Jul 17, 2022 5:14 am   
 
ok well, i deleted the variable, and remade it and this works fine: ugh cmud is being sketchy i guess...

#math gxprds (@ele.gxp)/@gxprd
#math gxptime %float(@gxprds*2/60/60.0)
gxptime=%format(2,@gxptime)

this works for what i needed!
Reply with quote
chaossdragon
Apprentice


Joined: 09 Apr 2008
Posts: 148

PostPosted: Mon Jul 18, 2022 10:49 am   
 
Shalimar advised me on a floating script a few years back, and had said you pretty much have to always use #.00 for it to function.

in fact you had commented on that exact thread "I suck at math" lol
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 174

PostPosted: Wed Jul 20, 2022 2:19 am   
 
i am not surprised at all that i forgot more than once:P thanks though.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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