20.10.2009, 14:37
Why when i make something with SendClientMessage/ToAll and i add in the text place %d and what i get is the text and lots of numbers why?
new string[16], myVariable = 5;
format(string, sizeof(string), "myInteger: %d", myVariable);
SendClientMessage(playerid, 0xFFFFFFAA, string);
new string[16], Float:myVariable = 5.0;
format(string, sizeof(string), "myFloat: %f", myVariable);
SendClientMessage(playerid, 0xFFFFFFAA, string);
new string[24], myVariable[8];
format(myVariable, sizeof(myVariable), "myText");
format(string, sizeof(string), "myString: %s", myVariable);
SendClientMessage(playerid, 0xFFFFFFAA, string);
new string[64], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s stole the cash.", playername);
SendClientMessageToAll(0xFFFFFFAA, string);
Originally Posted by Danikov
Errrrm once i logged in to the server i saw that i logged in(in yellow ^^)but when i take something like a pickup and it has a text i added the %s in the end of the text and my SA Crashes but its still running o.O
Help please? |