In response to Gigimoi
Indeed, listen to Garthor. You should never prefer to do things the more horrible way.
In response to Garthor
Actually, now that I think about it, a mob variable would make more sense in this case:

mob
var/tmp/obj/gold/statpanel_gold
Login()
..()
statpanel_gold = new()
Stat()
statpanel("Gold") stat("Gold: [gold]")
for(var/v = 0, v < gold, v += 50)
stat(statpanel_gold)


just so that you aren't creating / destroying the gold object every time. But it's a minimal difference.
In response to Garthor
Garthor wrote:
Actually, now that I think about it, a mob variable would make more sense in this case

No it wouldn't, but I'm already a step ahead of ya. ;P
In response to Kaioken
Yeah, I was about to go edit that because I realized that it made even more sense just being global.
In response to Kaioken
It may be silly to you, but it does work, because I've tested it fully

Edit:

Also, would only using only round(quotient,1), as you say, work in this case?:

gold = 40
divider = 50

quotient = gold/divider = 40/50 = 0.8

//Rounding 0.8 to the closest multiple of 1, would output 1, right?
//So the result would be 1 "gold object", when there aren't even a whole 50 goldpieces
Page: 1 2