This stupid thing keeps failing for some reason. It starts working fine at 0 gold. but the moment you pick up a gold piece it will not give a 4 character result for the display. It keeps showing up as a 3 character display and dropping the last character.
Thanks for any help finding that annoying bug in there. been staring too long at the code myself today.
Code:
Set SaveLoadConvertInteger = ((Triggering player) Current gold)
Set SaveLoadPowerOf = 4
For each (Integer A) from 1 to SaveLoadPowerOf, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SaveLoadPowerOf - (Integer A)) Greater than or equal to 1
Then - Actions
Set SaveLoadCurrentDivisor = 1
For each (Integer B) from (Integer A) to (SaveLoadPowerOf - 1), do (Actions)
Loop - Actions
Set SaveLoadCurrentDivisor = (SaveLoadCurrentDivisor x SaveLoadNumberSystemMax)
Set SaveLoadDividedInteger = (SaveLoadConvertInteger / SaveLoadCurrentDivisor)
Set SaveLoadTempString[9] = (SaveLoadTempString[9] + SaveLoadNumberSystem[SaveLoadDividedInteger])
Set SaveLoadRemainderInteger = (SaveLoadConvertInteger - (SaveLoadNumberSystemMax x SaveLoadDividedInteger))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SaveLoadPowerOf - (Integer A)) Less than or equal to 0
Then - Actions
Set SaveLoadTempString[9] = (SaveLoadTempString[9] + SaveLoadNumberSystem[SaveLoadRemainderInteger])
Else - Actions
Game - Display to (All players) for 30.00 seconds the text: SaveLoadTempString[9]
Thanks for any help finding that annoying bug in there. been staring too long at the code myself today.