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
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Sun Jul 24, 2005 2:53 am   

%format(2, %eval( %float... what!??!?!
 
Me again... ^^ Trying to get a percentage left of my script. Easy understand below...

#VARIABLE scriptpercent %format( 2, %eval( %float( @line / @line_max) * 100))

But its coming up with 0.00%... Wierd... =[ Any help would be much appreciated! TY much!
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sun Jul 24, 2005 3:42 am   
 
Sure its floating 0 %float(@line/@line) you only need to float one value *fixed below*

%format( 2, %eval( %float( @line)/@line_max*100))
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Sun Jul 24, 2005 4:03 am   
 
Huh... Aiight. So do I even need to use the float? It seems to me that might be overkill....
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sun Jul 24, 2005 4:58 am   
 
yes it has to be floated to return a floating point value otherwise it just returns everthing before the decimal
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Sun Jul 24, 2005 1:18 pm   
 
Alright. I'll give it a shot! Thankx Nexla! Your the man! (Or woman, whichever it may be... ^^)
Reply with quote
shaun.murray
Magician


Joined: 23 Jul 2005
Posts: 334
Location: Chicago

PostPosted: Sun Jul 24, 2005 4:48 pm   
 
Worked like a champ! =D
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