possibly unintended assignment - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: possibly unintended assignment (
/showthread.php?tid=647370)
possibly unintended assignment -
Longover - 04.01.2018
HELLO!
Errors:
Код:
C:\Program Files\Cops And Robbers Romania\filterscripts\Vehicule_Pers.pwn(211) : warning 211: possibly unintended assignment
C:\Program Files\Cops And Robbers Romania\filterscripts\Vehicule_Pers.pwn(1276) : warning 211: possibly unintended assignment
in lines:
Код:
CMD:nucumpar(playerid)
{
new vehid = GetPlayerVehicleID(playerid);
if(VehInfo[vehid][Cumparata] = 1) return SCM(playerid, -1, "Acest vehicul nu este de vanzare"); <--- ((((
else if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid, -1, "Nu esti intr-un vehicul!");
else
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
SCM(playerid, -1, "Ai refuzat acest vehicul");
}
return 1;
}
and:
Код:
if(newstate == PLAYER_STATE_DRIVER)
{
new vehid = GetPlayerVehicleID(playerid);
if(VehInfo[vehid][Cumparata] = 0) return SCM(playerid, PURPLE, "Pentru a cumpara acest vehicul trebuie sa scrii /vcumpara"), SCM(playerid, PURPLE, "Dar daca nu doresti sa-l cumperi scrie /nucumpar"), TogglePlayerControllable(playerid, 0); <----(((((((((
Contuar[playerid] = SetTimerEx("VerificaKilometri", 2500, true, "i", GetPlayerVehicleID(playerid));
}
Re: possibly unintended assignment -
RogueDrifter - 04.01.2018
change
PHP код:
if(VehInfo[vehid][Cumparata] = 0)
to
PHP код:
if(VehInfo[vehid][Cumparata] == 0)
on both cases.