muresan_emanuel2001 Posted February 26, 2016 Posted February 26, 2016 if(strcmp(cmd, "/vplate", true) == 0) { if(PlayerInfo[playerid][pAdmin] < 8) return SendClientMessage(playerid, COLOR_SERVER3, "Nu ai acces la aceasta comanda !"); new str[512],value[25]; if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: You're not in a vehicle."); new tmpcar = GetPlayerVehicleID(playerid); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /vplate [license-plate]"); return 1; } value = strval(tmp); SetVehicleNumberPlate(tmpcar, value); StaticVeh[tmpcar][vLicense] = value; mysql_format(handle,str,512,"UPDATE `staticveh` SET `License`='%s' WHERE `ID`='%d'",value,tmpcar); mysql_tquery(handle,str, "", ""); SetVehicleNumberPlate(tmpcar,StaticVeh[tmpcar][vLicense]); DestroyVehicle(tmpcar); CreateVehicle(StaticVeh[tmpcar][vModel],StaticVeh[tmpcar][vLocationx],StaticVeh[tmpcar][vLocationy],StaticVeh[tmpcar][vLocationz]+1.0,StaticVeh[tmpcar][vAngle],StaticVeh[tmpcar][vColorOne],StaticVeh[tmpcar][vColorTwo],StaticVeh[tmpcar][vRespawnDelay]); PutPlayerInVehicle(playerid, tmpcar, 0); return 1; } Eroare: C:\Users\Styl3x\Desktop\w3op\gamemodes\w3op.pwn(3306) : error 033: array must be indexed (variable "value")
Question
muresan_emanuel2001
if(strcmp(cmd, "/vplate", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 8) return SendClientMessage(playerid, COLOR_SERVER3, "Nu ai acces la aceasta comanda !");
new str[512],value[25];
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: You're not in a vehicle.");
new tmpcar = GetPlayerVehicleID(playerid);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /vplate [license-plate]");
return 1;
}
value = strval(tmp);
SetVehicleNumberPlate(tmpcar, value);
StaticVeh[tmpcar][vLicense] = value;
mysql_format(handle,str,512,"UPDATE `staticveh` SET `License`='%s' WHERE `ID`='%d'",value,tmpcar);
mysql_tquery(handle,str, "", "");
SetVehicleNumberPlate(tmpcar,StaticVeh[tmpcar][vLicense]);
DestroyVehicle(tmpcar);
CreateVehicle(StaticVeh[tmpcar][vModel],StaticVeh[tmpcar][vLocationx],StaticVeh[tmpcar][vLocationy],StaticVeh[tmpcar][vLocationz]+1.0,StaticVeh[tmpcar][vAngle],StaticVeh[tmpcar][vColorOne],StaticVeh[tmpcar][vColorTwo],StaticVeh[tmpcar][vRespawnDelay]);
PutPlayerInVehicle(playerid, tmpcar, 0);
return 1;
}
Eroare: C:\Users\Styl3x\Desktop\w3op\gamemodes\w3op.pwn(3306) : error 033: array must be indexed (variable "value")
0 answers to this question
Recommended Posts