21.06.2015, 21:23
Hello, I'm having a problem where only player id 0 uses any command for example /stats and its just not working. and printing error in the cmd.. here is the error and there is quick fix where i can just change the specifier "u" to "d" when using sscanf..
/stats for example
Whats the problem?
Code:
[00:10:10] [debug] Run time error 4: "Array index out of bounds" [00:10:10] [debug] Accessing element at index 12 past array upper bound 10 [00:10:10] [debug] AMX backtrace: [00:10:10] [debug] #0 0032c5c8 in ?? (0) from LG-RP.amx [00:10:10] [debug] #1 003175a4 in ?? (0, 0) from LG-RP.amx [00:10:10] [debug] #2 0013df08 in public cmd_stats (0, 34493368) from LG-RP.amx [00:10:10] [debug] #3 native CallLocalFunction () from samp-server.exe [00:10:10] [debug] #4 00006634 in public OnPlayerCommandText (0, 34493340) from LG-RP.amx
Code:
CMD:stats(playerid, params[]) { if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); ShowStats(playerid, playerid); return 1; }