error 010: invalid function or declaration
timer VaultTime[1000](playerid)
{
SendClientMessage(playerid, 0xFF000088, "The Vault Door is opening");
}
timer FlashLight[500](vehicleid)//500ms
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, engine, lights, VEHICLE_PARAMS_OFF, doors, bonnet, boot, objective);
//now it's done.
}
YCMD:flash(playerid, params[], help)
{
if(help) return SendClientMessage(playerid, gray, "/flash Is used to \"flash\" the lights of a vehicle.");
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, VEHICLE_PARAMS_ON, doors, bonnet, boot, objective);
//start the timer
//we're also passing the vehicleid as a param to the timer
defer FlashLight(GetPlayerVehicleID(playerid));
return 1;
}
|
and how did you call the timer? show that line and the code around it too
here's another example of a simple timer copied form one of my older scripts (uses y_commands) Код:
timer FlashLight[500](vehicleid)//500ms
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, engine, lights, VEHICLE_PARAMS_OFF, doors, bonnet, boot, objective);
//now it's done.
}
YCMD:flash(playerid, params[], help)
{
if(help) return SendClientMessage(playerid, gray, "/flash Is used to \"flash\" the lights of a vehicle.");
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, VEHICLE_PARAMS_ON, doors, bonnet, boot, objective);
//start the timer
//we're also passing the vehicleid as a param to the timer
defer FlashLight(GetPlayerVehicleID(playerid));
return 1;
}
|
error 010: invalid function or declaration C:\Users\Oussama\Documents\My pawn projects\Gamemodes\EO_CnR\gamemodes\LS_PX_CNR.pwn(1639) : error 017: undefined symbol "defer" C:\Users\Oussama\Documents\My pawn projects\Gamemodes\EO_CnR\gamemodes\LS_PX_CNR.pwn(1639) : error 017: undefined symbol "FlashLight"
|
These are the errors I get
Код:
error 010: invalid function or declaration C:\Users\Oussama\Documents\My pawn projects\Gamemodes\EO_CnR\gamemodes\LS_PX_CNR.pwn(1639) : error 017: undefined symbol "defer" C:\Users\Oussama\Documents\My pawn projects\Gamemodes\EO_CnR\gamemodes\LS_PX_CNR.pwn(1639) : error 017: undefined symbol "FlashLight" |
new Timer:speedoT[MAX_PLAYERS];
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
speedoT[playerid] = repeat speedo(playerid);
return 1;
}
timer speedo[700](playerid)//speedo
{
if(!IsPlayerInAnyVehicle(playerid))
{
stop speedoT[playerid];
SendClientMessage(playerid, -1, "aaaaaand am out.");
return 1;
}
SendClientMessage(playerid, -1, "inside..");
return 1;
}
invalid function or declaration
timer speedo[700](playerid)//speedo
{
SendClientMessage(playerid, -1, "inside..");
return 1;
}
|
I haven't made anything with this include yet, so I have no code to show, It's just, when I try to make something, it always display this
Код:
invalid function or declaration PHP код:
|