 |
morgair Beginner
Joined: 10 Nov 2000 Posts: 24 Location: USA
|
Posted: 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?
|
|
|
 |
misterbalrog Apprentice
Joined: 26 Oct 2004 Posts: 108
|
Posted: 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.
|
|
|
 |
morgair Beginner
Joined: 10 Nov 2000 Posts: 24 Location: USA
|
Posted: 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 |
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: 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 |
|
|
 |
Dharkael Enchanter

Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: 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  |
|
_________________ -Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style." |
|
|
 |
|
|