05.04.2011, 11:46
Hello.
I'm scripting some advanced function with the use of textdraws, but it causes some crashes. Look at the code (of course it's changed a bit, I don't want to publish my whole work).
When I use command with submitted code, it causes a crash and kicks me. Strange though, when I change loop to call for 9 times (for new p = 1; p < 10; p++), it... works. Anyone knows how to solve this problem?
BTW. sorry for my English, if something is hard to understand, please let me know.
I'm scripting some advanced function with the use of textdraws, but it causes some crashes. Look at the code (of course it's changed a bit, I don't want to publish my whole work).
Код:
new str[1024]; for(new p = 1; p < 11; p++) { new i = Occupied(playerid, p); // Returns ID of some thing. if(i) format(str, sizeof(str), "%s~n~~y~~h~%d - Raawr~n~", str, p); else format(str, sizeof(str), "%s~n~", str); } TextDrawSetString(TD[playerid], str); TextDrawShowForPlayer(playerid, TD[playerid]);
BTW. sorry for my English, if something is hard to understand, please let me know.