Include help
#1

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
Reply
#2

pawn Код:
#if defined _samp_included
    #endinput
#else
#include a_samp
#pragma library samp
Reply
#3

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"..
Reply
#4

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>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)