error 010: invalid function or declaration
#1

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.
Reply
#2

The commands must be inside OnPlayerCommandText. Plus, you forgot the opening braces.
Reply
#3

Fixed, thanks.
Reply
#4

i got the same problem but cant fix it :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)