20.01.2016, 10:41
Hello. So I am making a command, which creates a ladder, then after the 10 seconds, it gets destroyed. For some reason I'm getting an error after the re-compile. Although the includes from YSI are updated.
Here is the code:
The error is related to "public RemoveLadders(playerid)"
Please help me to fix this. Thanks in advance!
Here is the code:
PHP код:
forward RemoveLadders();
CMD:ladders(playerid, params[])
{
new Float:pz, Float:x, Float:y, Float:z;
GetPlayerFacingAngle(playerid, pz);
GetPlayerPos(playerid, Float:x, Float:y, Float:z);
if(PlayerInfo[playerid][pClass] >= 2)
{
GetXYInFrontOfPlayer(playerid, Float:x,Float:y, 1.0);
CreateObject(1437,Float:x,Float:y,Float:z,-22.0,0.0,pz,500.0);
SetTimerEx("RemoveLadders", 10000,false,"i",playerid);
}
return 1;
}
public RemoveLadders(playerid)
{
DestroyObject(ladders[playerid]);
return 1;
}
Please help me to fix this. Thanks in advance!