I have a script that is used for a online game.
People can use it to calculate money in their bank with the use of interest.
They put the gold in their bank account and also the hours they want to see. for example: "richard calc 7646383 5" where 5 is the hours.
The script i have does work, but has a maximum of 10 digits.
Also when 10 digits is used, it puts a - before the total.
Is there a way to make it so that it calculates people's gold witch are more than 10 digits?
The code is:
Code: Select all
set gold_start [lindex $arg 1]
set gold_hours [lindex $arg 2]
set check 1
set gold_make "$gold_start"
while {$check != [expr $gold_hours +1]} {
set gold_new [expr $gold_make * 0.01]
set gold_make [expr int ($gold_make) + $gold_new]
set check [incr check]
}
putserv "PRIVMSG $channel :After $gold_hours hour(s) in the bank, $gold_start gold will be [expr int($gold_make)] gold."
}