possibly unintended assignment
#1

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));
	}
Reply
#2

change
PHP код:
if(VehInfo[vehid][Cumparata] = 0
to
PHP код:
if(VehInfo[vehid][Cumparata] == 0
on both cases.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)