01.06.2017, 23:13
The code "CheezIt" replied is the function you should use to do such thing.
Add anywhere in your script. Preferably the last lines to avoid confusion. (ensuring it's not in the scoop of other functions/callbacks)
Then you can use it as follows, for example:
The reason we used "%s" - which is normally for strings - instead of "%d" - which is normally for integers -because the function format number returns a string, not an integer, so take care not to get confused.
Add anywhere in your script. Preferably the last lines to avoid confusion. (ensuring it's not in the scoop of other functions/callbacks)
Then you can use it as follows, for example:
Код:
new x=1; new str[128]; format(str,sizeof(str), "%s", FormatNumber(x)); printf(str);