PDA

View Full Version : error 010: invalid function or declaration


ItsJosh
18/04/2016, 04:37 PM
I keep getting this 'error 010: invalid function or declaration'
SA-MP Server\gamemodes\jdm.pwn(204) : error 010: invalid function or declaration
SA-MP Server\gamemodes\jdm.pwn(207) : error 010: invalid function or declaration
SA-MP Server\gamemodes\jdm.pwn(210) : error 010: invalid function or declaration
SA-MP Server\gamemodes\jdm.pwn(213) : error 010: invalid function or declaration

This is the code at the lines:



if (strcmp("/dm", cmdtext, true, 10) == 0)
SetPlayerPos(playerid, -1953.2880,267.4391,41.0471);
SendClientMessage(playerid,WHITE_COLOR, "You have teleported to Deathmatch.");
return 1;
}

if (strcmp("/suicide", cmdtext, true, 10) == 0)
SetPlayerHealth(playerid, 0.0);
SendClientMessage(playerid,WHITE_RED, "REST IN PEACE.");
return 1;
}







public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{


I included thoses OnPlayer just in case if it matters, I really need some help with this.

I'm going to +rep if you help me.

zPain
18/04/2016, 05:02 PM
The commands must be inside OnPlayerCommandText. Plus, you forgot the opening braces.

ItsJosh
18/04/2016, 06:02 PM
Fixed, thanks.

DJefferson
12/01/2018, 03:08 PM
i got the same problem but cant fix it :/