Symbol Already Defined: RNPC_OnPlayerSpawn - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Symbol Already Defined: RNPC_OnPlayerSpawn (
/showthread.php?tid=583378)
Symbol Already Defined: RNPC_OnPlayerSpawn -
meocahat - 28.07.2015
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
Re: Symbol Already Defined: RNPC_OnPlayerSpawn -
meocahat - 28.07.2015
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 ?
Re: Symbol Already Defined: RNPC_OnPlayerSpawn -
ognyanov - 28.07.2015
Yes this code
PHP Code:
CallLocalFunction("RNPC_OnPlayerSpawn", "i", playerid);
return 1;
When you delete this code what happens ?
First create backup ?
Re: Symbol Already Defined: RNPC_OnPlayerSpawn -
meocahat - 28.07.2015
Quote:
Originally Posted by ognyanov
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
Re: Symbol Already Defined: RNPC_OnPlayerSpawn -
meocahat - 28.07.2015
Solved guys: Downgrade rnpc to 2013 version

Thanks