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


Joined: 10 Nov 2000
Posts: 24
Location: USA

PostPosted: Tue Jan 25, 2005 6:51 am   

2147483904
 
The max gold was removed from the mud I play but when i use math commands with say 13bil in coins it always returns 2147483904 is there any way to eliminate the cap in zmud?
Reply with quote
misterbalrog
Apprentice


Joined: 26 Oct 2004
Posts: 108

PostPosted: Tue Jan 25, 2005 9:38 am   
 
Divide it by a thousand... since you have 13 BILLION coins, a few hundreds isn't going to throw off your economy that much.
Reply with quote
morgair
Beginner


Joined: 10 Nov 2000
Posts: 24
Location: USA

PostPosted: Wed Jan 26, 2005 5:47 am   
 
well i cant really do that. I was actually trying to make a program to figure out how long itd take me to accumulate soo much interest but the interest is calculated like .0001% or 1.0000001 of your balance which is 13.8 bil so i need the thousands and the hundreds and all that jazz
_________________
Morgair, Master of the Obvious
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Wed Jan 26, 2005 11:08 am   
 
You are going to have to break the number into smaller parts for preforming the math. Please provide some mud specific lines and a full detailed explanation of the math that needs to be done and I will try to come up with a way to do it over the next few days.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Fri Jan 28, 2005 8:15 pm   
 
You can do the math in JScript or VBScript but when returning the value you need fudge it so its not interpreted as a number.
simple example:
Code:
#eval %mss("(3000000000 + 500300000)","JScript")

will echo 2147483647
but if you add something to it
Code:
#eval %mss("(3000000000 + 500300000)+' '","JScript")
will echo 3500300000
Since i appended a space before returning the value,you could prepend if you prefer.

also it appears that if you pass the number returned from %mss into
a zmud string manipulation function you dont need to fudge it.
Code:
#eval %concat(%mss("(3000000000 + 500300000)","JScript"))

will also echo 3500300000

anyways that should do the trick Wink
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
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