SA-MP Forums Archive
[HELP] About #include - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] About #include (/showthread.php?tid=137310)



[HELP] About #include - boynumber5 - 28.03.2010

When i

#include <a_samp> and
#include <a_npc> and i use this command

new string[255];

public OnPlayerSpawn(playerid)
{
format(string,sizeof(string),"НРдГ");
SendChat(string);
return 1;
}

or any command in a_npc.inc it will error all like this error 017: undefined symbol "SendChat"


but when i do like this

#include <a_npc> (change position)and
#include <a_samp> and i use this command

new string[255];

public OnPlayerSpawn(playerid)
{
format(string,sizeof(string),"НРдГ");
SendChat(string);
return 1;
}

it error like this warning 235: public function lacks forward declaration (symbol "OnPlayerSpawn")

can anybody tell me.




Re: [HELP] About #include - ¤Adas¤ - 28.03.2010

You can define only one of them. It depends on thing, if it is a NPC-Mode. There is not callback "OnPlayerSpawn".
You have to do it in your GameMode.