12.12.2018, 19:36
Hello!!! , I am Darksoneee i need help in my problem is this:
and this code of OnQueryFinished
Код:
[debug] Run time error 4: "Array index out of bounds" [debug] Attempted to read/write array element at negative index -1 [debug] AMX backtrace: [debug] #0 0007b800 in ?? (15) in wordwar.amx [debug] #1 000c0b3c in public OnQueryFinished (14, 0) in wordwar.amx
Код:
} forward OnQueryFinished(threadid, extraid); public OnQueryFinished(threadid, extraid) { new rows = cache_get_row_count(connectionID); switch(threadid) { case THREAD_LOOKUP_BANS: { if(rows) { new bannedby[24], date[24], reason[128]; cache_get_field_content(0, "bannedby", bannedby); cache_get_field_content(0, "date", date); cache_get_field_content(0, "reason", reason); GameTextForPlayer(extraid, "~r~You are banned!", 999999, 3); TextDrawHideForPlayer(extraid, welcomenew); if(cache_get_field_content_int(0, "permanent")) SendClientMessageEx(extraid, COLOR_YELLOW, "You are permanently banned from this server."); else SendClientMessageEx(extraid, COLOR_YELLOW, "You are banned from this server. You can appeal your ban at Deviation.cf."); SendClientMessageEx(extraid, COLOR_LIGHTRED, "Admin: %s", bannedby); SendClientMessageEx(extraid, COLOR_LIGHTRED, "Date: %s", date); SendClientMessageEx(extraid, COLOR_LIGHTRED, "Reason: %s", reason); KickPlayer(extraid); } else { mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "SELECT uid FROM users WHERE username = '%s'", GetPlayerNameEx(extraid)); mysql_tquery(connectionID, queryBuffer, "OnQueryFinished", "ii", THREAD_LOOKUP_ACCOUNT, extraid); } } case THREAD_LOOKUP_ACCOUNT: { if(rows) {