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
Jared242004
Beginner


Joined: 28 Jul 2004
Posts: 21
Location: Canada

PostPosted: Fri Sep 11, 2009 12:33 am   

Avg exp for the day
 
@kills 75 @exp 157468 and I want to average it and put into @avg variable

#math avg {@exp/@kills}

Is this close?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4677
Location: Pensacola, FL, USA

PostPosted: Fri Sep 11, 2009 12:47 am   
 
yes, but i would %float one of the numbers, else it will only to integer math
_________________
Discord: Shalimarwildcat
Reply with quote
Jared242004
Beginner


Joined: 28 Jul 2004
Posts: 21
Location: Canada

PostPosted: Fri Sep 11, 2009 12:59 am   
 
shalimar wrote:
yes, but i would %float one of the numbers, else it will only to integer math


I just read on float in help files can seem to grasp it, could you rewrite the command or tell me where to insert it?

#math avg {@kills/@exp}

Thanks again
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4677
Location: Pensacola, FL, USA

PostPosted: Fri Sep 11, 2009 5:22 am   
 
#MATH avg {%float(@kills)/%float(@exp)}
_________________
Discord: Shalimarwildcat
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