C:\Users\Robin\Desktop\New folder\pawno\include\/CRP/Publics/OnPlayerCommand.pwn(194) : error 047: array sizes do not match, or destination array is too small
}
if(strcmp(cmd, "/use", true) == 0) // by Cuervo
{
if(IsPlayerConnected(playerid))
{
new x_nr[24];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_GREY, "USAGE: /use [backpack, briefcase, nothing]");
SendClientMessage(playerid, COLOR_GREY, "TIP: \"nothing\" will remove the item from your body!");
return 1;
}
if(strcmp(x_nr,"backpack",true) == 0)
{
AttachObjectCorrectly(playerid, 3026);
}
else if(strcmp(x_nr,"briefcase",true) == 0)
{
AttachObjectCorrectly(playerid, 1210);
}
else if(strcmp(x_nr,"nothing",true) == 0)
{
RemovePlayerAttachedObject(playerid,3);
}
else return SendClientMessage(playerid, COLOR_GREY,"* Unknown item!");
}
return 1;
new x_nr[ 256 ];
|
Try set the value on the variable because it probably is too small.
pawn Код:
|