29.11.2009, 08:33
I need help with this code,it gives me an error when i compile it.
C:\Documents and Settings\аеш рчщ\щемзп дтбегд\оег згщ\Script\roleplay.pwn(21695) : 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.
I have tried to change the result to 256,but that didn't work.
Код:
if(strcmp(cmd, "/editcardes", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] < 4) { SendClientMessage(playerid, COLOR_GRAD2, " You are not an Admin !"); return 1; } if(IsAnOwnableCar(idcar)) { 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: /osay TEXT"); return 1; } CarInfo[idcar][cDescription] = result; format(string, sizeof(string), "Vehicle id %s's price changed to %d",idcar,CarInfo[idcar][cValue],result); SendClientMessage(playerid, COLOR_GRAD2, string); OnPropUpdate(); } } return 1; }
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
I have tried to change the result to 256,but that didn't work.