24.07.2014, 19:01
I have a little problem:
command:
What's wrong?
Код:
[21:30:24] [debug] Run time error 4: "Array index out of bounds" [21:30:24] [debug] Accessing element at index 24 past array upper bound 11 [21:30:24] [debug] AMX backtrace: [21:30:24] [debug] #0 000066a4 in ?? (0x00000720, 0x000068c8, 0x000068c8, 0x000068c8, 0x000068c4, 0x000068c0, 0x000068c8, 0x00000001, 0x00000000) from aaa.amx [21:30:24] [debug] #1 0000689c in public cmd_check (0x00000000, 0x00002aac) from aaa.amx [21:30:24] [debug] #2 native CallLocalFunction () [00472ad0] from samp-server.exe [21:30:24] [debug] #3 000003e0 in public OnPlayerCommandText (0x00000000, 0x00002a90) from aaa.amx
Код:
CMD:check(playerid, params[]) { #pragma unused params new buff[64], temp, hour, minute; TimestampToDate(pData[playerid][last_session], temp, temp, temp, hour, minute, temp, 1); format( buff, sizeof ( buff ), "H: %02d M: %02d", hour, minute); SendClientMessage(playerid, -1, buff); return 1; }