Quote:
Originally Posted by BlueRey
fix: http://bluerey.pastebin.com/e82A5hfU
pawn Код:
stock FormatMoney(Float:amount,delimiter[2]=",") { #define MAX_MONEY_STRING 16 new txt[MAX_MONEY_STRING]; format(txt,MAX_MONEY_STRING,"%d",floatround(amount)); new l = strlen(txt); if(amount < 0) { if(l >= 5) strins(txt,delimiter,l-3); if(l >= 8) strins(txt,delimiter,l-6); if(l >= 11) strins(txt,delimiter,l-9); } else { if(l >= 4) strins(txt,delimiter,l-3); if(l >= 7) strins(txt,delimiter,l-6); if(l >= 10) strins(txt,delimiter,l-9); } return txt; }
|
And what exactly did you "fix"? did you test your code? I tested mine, it works fine and I posted my results... .