Some king of error - 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: Some king of error (
/showthread.php?tid=282081)
Some king of error -
retejas - 09.09.2011
Hi i was making vehicle control sistem and i get error.I dont know how can i fix it please help
Код:
C:\Modelis\gamemodes\band7.pwn(11699) : error 076: syntax error in the expression, or invalid function call
Код:
if(Engine[vehicleid] == true)
{
if(!Engine[vehicleid]) return SendClientMessage(playerid,WHITE,"Variklis jau yra {E31919}isjungtas!");
TogglePlayerControllable(playerid, true);
SendClientMessage(playerid,WHITE,"Variklis {E31919}isjungtas!");
GetVehicleParamsEx(vehicleid,engine,light,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_OFF,light,alarm,doors,bonnet,boot,objective);
11699 KillTimer(Degalai);
Engine[vehicleid] = false;
}
else if(Engine[vehicleid] == false)
{
new Float:health;
GetVehicleHealth(vehicleid, health);
if(health >350)
{
if(Engine[vehicleid]) return SendClientMessage(playerid,WHITE,"Variklis jau yra {2F991A}ijungtas!");
TogglePlayerControllable(playerid, true);
SendClientMessage(playerid,WHITE,"Variklis {2F991A}ijungtas!");
diegalai[playerid]=SetTimerEx("Degalai",1000*60*5,true,"i",playerid);
GetVehicleParamsEx(vehicleid,engine,light,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,light,alarm,doors,bonnet,boot,objective);
Engine[vehicleid] = true;
}
Re: Some king of error -
=WoR=G4M3Ov3r - 09.09.2011
Where's your SetTimer ?, show me the line.
Re: Some king of error -
retejas - 09.09.2011
diegalai[playerid]=SetTimerEx("Degalai",1000*60*5,true,"i",playerid) ; i what system is this
Re: Some king of error -
=WoR=G4M3Ov3r - 09.09.2011
PHP код:
diegalai = SetTimerEx("Degalai", 1000, true, "i", playerid);
PHP код:
KillTimer(degalai);
Re: Some king of error -
retejas - 09.09.2011
Its dont help now i shut rename my timer
Re: Some king of error -
JaTochNietDan - 09.09.2011
If it's an array it should be this:
pawn Код:
KillTimer(diegalai[playerid]);
So you're pointing to the cell in the array which contains that playerid's timer id.