Error 25
#1

Hello may I please get a hand whenever I attempt to compile I get this error
Код:
include\rnpc.inc(539) : error 025: function heading differs from prototype
OnPlayerSpawn
Код:
	
        ApplyAnimation(playerid, "BOMBER", "null", 0, 0, 0, 0, 0, 1);
  	ApplyAnimation(playerid, "PED", "null", 0, 0, 0, 0, 0, 1);

	if(IsPlayerNPC(playerid))
 	{
  		new spawn = random(sizeof(ZombieSpawns));
    	SetPlayerPos(playerid, ZombieSpawns[spawn][0], ZombieSpawns[spawn][1], ZombieSpawns[spawn][2]);

		SetRNPCHealth(playerid, ZOMBIE_HEALTH);
  		SetPlayerSkin(playerid, ZOMBIE_SKIN);
    	SetPlayerColor(playerid, ZOMBIE_COLOR);

		RNPC_SetShootable(playerid, 1);
  		RNPC_ToggleVehicleCollisionCheck(playerid, 1);

		GetZombieVictimID[playerid] = INVALID_PLAYER_ID;
		ZombiesAlive++;
		ZombiesMax++;
		return 1;
	}
 	else
  	{
   		GetVictimDetectRange[playerid] = ZOMBIE_DETECT;
     	GetVictimTimerStatus[playerid] = 0;
   	}
OnPlayerSpawn in include
Код:
public OnPlayerSpawn(playerid) {
	if (IsPlayerRNPC(playerid)) {
	
		rnpcData[playerid][RNPC_HEALTH] = 100.0;
		rnpcData[playerid][RNPC_DEAD] = 0;
		
	}
	
	#if defined RNPC_OnPlayerSpawn
		return RNPC_OnPlayerSpawn(playerid);
	#else
		return 1;
	#endif
}
#if defined _ALS_OnPlayerSpawn
	#undef OnPlayerSpawn
#else
	#define _ALS_OnPlayerSpawn
#endif
#define OnPlayerSpawn RNPC_OnPlayerSpawn
forward RNPC_OnPlayerSpawn(playerid);
Please help me,also the identitations are correct but the forums messed them up.
Reply
#2

Код:
ppublic OnPlayerSpawn(playerid) {
You wrote it with 2 P's, it should just be "public".
Reply
#3

I must've accidently added an extra p when i wrote the thread sorry
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)