SA-MP Forums Archive
Symbol already defined: "Audio_OnPlayerDisconnect" - 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: "Audio_OnPlayerDisconnect" (/showthread.php?tid=655822)



Symbol already defined: "Audio_OnPlayerDisconnect" - AlfaSufaIndo - 30.06.2018

Sorry for asking to much xD
Can anyone fix this error?
Код:
Gamemode Line 12199: symbol already defined: "Audio_OnPlayerDisconnect"
PHP код:
public OnPlayerDisconnect(playeridreason
My audio include:

PHP код:
public OnPlayerDisconnect(playeridreason)
{
    if (!
IsPlayerNPC(playerid))
    {
        
Audio_RemovePlayer(playerid);
    }
    if (
Audio_g_OPDC)
    {
        return 
CallLocalFunction("Audio_OnPlayerDisconnect""dd"playeridreason);
    }
    return 
1;
}
#if defined _ALS_OnPlayerDisconnect
    #undef OnPlayerDisconnect
#else
    #define _ALS_OnPlayerDisconnect
#endif
#define OnPlayerDisconnect Audio_OnPlayerDisconnect
forward Audio_OnPlayerDisconnect(playeridreason); 



Re: Symbol already defined: "Audio_OnPlayerDisconnect" - DerickClark - 30.06.2018

remove

#define OnPlayerDisconnect Audio_OnPlayerDisconnect



Re: Symbol already defined: "Audio_OnPlayerDisconnect" - AlfaSufaIndo - 30.06.2018

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
remove

#define OnPlayerDisconnect Audio_OnPlayerDisconnect
Haha XD And when I tried it came up like this
Gamemodes a.pwn Error Line: symbol already defined: "OnPlayerDisconnect"
Includes *******_stream.inc Error Line: symbol already defined: "OnPlayerDisconnect"


Re: Symbol already defined: "Audio_OnPlayerDisconnect" - DerickClark - 30.06.2018

Maybe look in both gamemodes?
in your main one
Audio_OnPlayerDisconnect


Re: Symbol already defined: "Audio_OnPlayerDisconnect" - AlfaSufaIndo - 30.06.2018

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
Maybe look in both gamemodes?
in your main one
Audio_OnPlayerDisconnect
In my gamemode there's only one OnPlayerDisconnect, I'm very confused


Re: Symbol already defined: "Audio_OnPlayerDisconnect" - DerickClark - 30.06.2018

I think you need to remove Audio_OnPlayerDisconnenect from
#define OnPlayerDisconnect


Re: Symbol already defined: "Audio_OnPlayerDisconnect" - AlfaSufaIndo - 30.06.2018

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
I think you need to remove Audio_OnPlayerDisconnenect from
#define OnPlayerDisconnect
Okay i have fixed all the error in includes, now just only one error in the Gamemode
Код:
symbol already defined: "OnPlayerDisconnect"
Now how can i fix that xD


Re: Symbol already defined: "Audio_OnPlayerDisconnect" - DerickClark - 30.06.2018

You put your code as INC file?
cause seems like you have both gamemode

Use YSI.


Re: Symbol already defined: "Audio_OnPlayerDisconnect" - Calisthenics - 30.06.2018

Do not modify ALS code, re-download the includes you edited (audio and stream) and post your includes here. Another include does not hook and just gives the name of the previous include that uses OnPlayerDisconnect.


Re: Symbol already defined: "Audio_OnPlayerDisconnect" - AlfaSufaIndo - 30.06.2018

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
You put your code as INC file?
cause seems like you have both gamemode

Use YSI.
Quote:
Originally Posted by Calisthenics
Посмотреть сообщение
Do not modify ALS code, re-download the includes you edited (audio and stream) and post your includes here. Another include does not hook and just gives the name of the previous include that uses OnPlayerDisconnect.
Okay now, i have fixed the errors.. But, instead back to the warning as in the previous thread. like this
Код:
public function lacks forward declaration (symbol "stream_OnPlayerDisconnect")
stream_OnPlayerDisconnect is from *******_stream include