How to use public functions in an include??
#6

Quote:
Originally Posted by ******
Посмотреть сообщение
You don't use F_OnPlayerConnect - that basically renames the NEXT OnPlayerConnect which MAY be the one in the gamemode or one in another library.
I don't really understand what you mean,

I have this now:
Код:
public OnPlayerConnect(playerid) //yes, this is also in the include!
{
	//code
}
public OnPlayerConnect(playerid)
{
    if(funcidx("F_OnPlayerConnect") != -1)
    {
        return CallLocalFunction("F_OnPlayerConnect", "i", playerid);
    }
    return 1;
}
    
#if defined _ALS_OnPlayerConnect
    #undef OnPlayerConnect
#else
    #define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect F_OnPlayerConnect
forward F_OnPlayerConnect(playerid);
that's in the include

but now I get error 021: symbol already defined: "OnPlayerConnect" (error occurs in the include)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)