Quote:
Originally Posted by CheezIt
Don't use his code, it's rubbish.
Here's an example:
pawn Code:
public OnPlayerConnect(playerid) { new string[144], var = 215161241; format(string, sizeof(string), "Without the use of function: %d - With prior use: %s", var, FormatNumber(var)); SendClientMessage(playerid, -1, string); return 1; }
FormatNumber(integer, const separator[] = ",") { new string[16]; valstr(string, integer);
if(integer >= 1000) { for(new i = (strlen(string) - 3); i > 0; i -= 3) { strins(string, separator, i); } } return string; }
You will get the following message in-game when you connect:
If you still don't know how to use the function then there is absolutely no way to help you any further.
|
It is known, you are a fetus, this code is used on many Romanian servers and does not even produce a bug.
My code works as follows:
Ex:
Your code
Code:
format(string, 256, "Money: $%d", FormatNumber(money));
My code:
Code:
format(string, 256, "Money: $%s", FormatNumber(money));
My function is string type, it requires %s