Include help - 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: Include help (
/showthread.php?tid=256077)
Include help - Unknown123 - 18.05.2011
test.inc
pawn Код:
#if !defined FILTERSCRIPT
public OnGameModeInit()
#else
public OnFilterScriptInit()
#endif
{
//CODE
//CODE
//CODE
return 1;
}
#if !defined FILTERSCRIPT
public OnGameModeInit()
#else
public OnFilterScriptInit()
#endif
{ //error 021: symbol already defined: "OnGameModeInit"
//CODE
//CODE
//CODE
return 1;
}
//OnGameModeInit
#if defined _ALS_OnGameModeInit
#undef OnGameModeInit
#else
#define _ALS_OnGameModeInit
#endif
//OnGameModeExit
#if defined _ALS_OnGameModeExit
#undef OnGameModeExit
#else
#define _ALS_OnGameModeExit
#endif
//OnGameModeInit
#define OnGameModeInit forward_OnGameModeInit
forward forward_OnGameModeInit();
//OnGameModeExit
#define OnGameModeExit forward_OnGameModeExit
forward forward_OnGameModeExit();
fs.pwn
pawn Код:
#include <test>
#define FILTERSCRIPT
public OnFilterScriptInit()
{
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
You find the Error message in the .inc
Re: Include help -
TheGarfield - 18.05.2011
pawn Код:
#if defined _samp_included
#endinput
#else
#include a_samp
#pragma library samp
Re: Include help - Unknown123 - 18.05.2011
I got some "stock" in the .inc too, and when i add
pawn Код:
#if defined _samp_included
#endinput
#else
#include a_samp
#pragma library samp
then i get a warning "undefined symbol" on my "stock"..
Re: Include help -
MadeMan - 19.05.2011
You have 2 OnGameModeInits in your test.inc, maybe one of them should be OnGameModeExit?
And define FILTERSCRIPT before you load your inc file
pawn Код:
#define FILTERSCRIPT
#include <test>