Symbol Already Defined: RNPC_OnPlayerSpawn
#1

Hi guys. i was converted my gamemode with no errors for sure.
i added #include <policeai>
policeai.inc you guys can see here (Credits Mauzen): http://pastebin.com/4SrEhUk7
Then, pawno gave me errors:

Code:
D:\RCRP\pawno\include\policeai.inc(221) : warning 209: function "RNPC_OnPlayerSpawn" should return a value
D:\RCRP\pawno\include\YSI\internal\y_dohooks.inc(941) : error 021: symbol already defined: "RNPC_OnPlayerSpawn"
I added return 1; for function RNPC_OnPlayerSpawn, but with the second error, its not any connection with policeai.inc, although i was compiled successful my gamemode easily with no errors without policeai.inc

Line 941:
Code:
public OnPlayerSpawn(playerid)
{ // <----------- 941
	P:2("Hooks_OnPlayerSpawn called: %d", playerid);
	new
        .......
        .......
	P:2("Hooks_OnPlayerSpawn end 2: %d %d", ret, _:Bit_GetBit(Bit:gs_ALS, _:ALS_OnPlayerSpawn));
	HOOK_RETURN<PlayerSpawn>
}
#if defined _ALS_OnPlayerSpawn
    #undef OnPlayerSpawn
#else
    #define _ALS_OnPlayerSpawn
#endif
#define OnPlayerSpawn S@@_OnPlayerSpawn
ALS_FORWARD<PlayerSpawn>
Please help me guys
Reply
#2

Hey guys, when i delete these code, it compiled:

Code:
public OnPlayerSpawn(playerid)
{
	if (IsPlayerNPC(playerid)) {
		// Find the array index of the npc
		new slot = -1;
		for (new i = 0; i < MAX_RNPC_POLICE; i++) {
			if (rpol[i][RPOL_NPCID] == playerid) {
				slot = i;
				break;
			}
		}
		// If playerid is a policeman
		if (slot > -1) {
			SetPlayerSkin(playerid, rpol[slot][RPOL_SKIN]);
		}
	}
 	CallLocalFunction("RNPC_OnPlayerSpawn", "i", playerid);
	return 1;
}
Any help ?
Reply
#3

Yes this code
PHP Code:
CallLocalFunction("RNPC_OnPlayerSpawn""i"playerid);
    return 
1
When you delete this code what happens ?
First create backup ?
Reply
#4

Quote:
Originally Posted by ognyanov
View Post
Yes this code
PHP Code:
CallLocalFunction("RNPC_OnPlayerSpawn""i"playerid);
    return 
1
When you delete this code what happens ?
First create backup ?
Code:
D:\RCRP\pawno\include\YSI\internal\y_dohooks.inc(941) : error 021: symbol already defined: "RNPC_OnPlayerSpawn"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Any another help
Reply
#5

Solved guys: Downgrade rnpc to 2013 version
Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)