17.09.2009, 09:07
The error line is on: PlayerInfo[playerid][pCodename] = result;
Code:
C:\Program Files\Rockstar Games\GTA San Andreas\samp\gamemodes\cwrp.pwn(27216) : error 047: array sizes do not match, or destination array is too small Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Code:
if(strcmp(cmd, "/codename", true) == 0) { if(PlayerInfo[playerid][pAdmin] >= 4) { new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /codename [newname]"); return 1; } format(string, sizeof(string), "%s", result); PlayerInfo[playerid][pCodename] = result; <------- THE ERROR IS HERE. format(string, sizeof(string), "Codename changed to %s.", PlayerInfo[playerid][pCodename]); SendClientMessage(playerid, COLOR_GREY, string); return 1; } else { SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!"); return 1; } }