D:\Russian Fortunes RP\Russian Fortunes RP\gamemodes\new.pwn(17085) : error 047: array sizes do not match, or destination array is too small
это код ошибки вот сам код
if(strcmp(cmd, "/mig", true) == 0)
{
//new member = PlayerInfo[playerid][pMember]; new leader = PlayerInfo[playerid][pLeader];
new car = GetPlayerVehicleID(playerid);
if(PlayerInfo[playerid][pAdministrator] > 0 || IsACop(playerid))
{
if(IsPlayerConnected(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new text[32];
text = strtok(cmdtext, idx);
if(!strlen(text))
{
SendClientMessage(playerid, COLOR_GRAD1, "RF RP: /mig [on/off]");
return 1;
}
if(strcmp(text,"on",true) == 0)
{
DestroyObject(police[car]);
police[car] = CreateObject(18646,0,0,0,0,0,0,100.0);
AttachObjectToVehicle(police[car], GetPlayerVehicleID(playerid), -0.4, -0.1, 0.87, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GREEN2, "RF RP: Вы установили полицейскую мигалку.");
}
else if(strcmp(text,"off",true) == 0)
{
DestroyObject(police[car]);
SendClientMessage(playerid, COLOR_RED2, "RF RP: Вы сняли полицейскую мигалку.");
}
}
}
return 1;
}
ошибка в этой строке
это код ошибки вот сам код
if(strcmp(cmd, "/mig", true) == 0)
{
//new member = PlayerInfo[playerid][pMember]; new leader = PlayerInfo[playerid][pLeader];
new car = GetPlayerVehicleID(playerid);
if(PlayerInfo[playerid][pAdministrator] > 0 || IsACop(playerid))
{
if(IsPlayerConnected(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new text[32];
text = strtok(cmdtext, idx);
if(!strlen(text))
{
SendClientMessage(playerid, COLOR_GRAD1, "RF RP: /mig [on/off]");
return 1;
}
if(strcmp(text,"on",true) == 0)
{
DestroyObject(police[car]);
police[car] = CreateObject(18646,0,0,0,0,0,0,100.0);
AttachObjectToVehicle(police[car], GetPlayerVehicleID(playerid), -0.4, -0.1, 0.87, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GREEN2, "RF RP: Вы установили полицейскую мигалку.");
}
else if(strcmp(text,"off",true) == 0)
{
DestroyObject(police[car]);
SendClientMessage(playerid, COLOR_RED2, "RF RP: Вы сняли полицейскую мигалку.");
}
}
}
return 1;
}
ошибка в этой строке
text = strtok(cmdtext, idx);