SA-MP Forums Archive
Warning PLS Help me - 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: Warning PLS Help me (/showthread.php?tid=597883)



Warning PLS Help me - Dainteresebuli - 06.01.2016

PHP код:
C:\Users\Kosta\Desktop\615_test_rp_gm_\gamemodes\gm.pwn(146) : warning 201redefinition of constant/macro (symbol "FD2")
C:\Users\Kosta\Desktop\615_test_Rp_gm_\gamemodes\gm.pwn(56233) : warning 219local variable "Admin" shadows a variable at a preceding level
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
2 Warnings

Help me pls To Fix This problem some 1


Re: Warning PLS Help me - Amunra - 06.01.2016

Show your Code xD


Re: Warning PLS Help me - Dainteresebuli - 06.01.2016

Wich Content? i am noob tho


Re: Warning PLS Help me - Karan007 - 06.01.2016

Show us the line 146 & 56233.


Re: Warning PLS Help me - SickAttack - 06.01.2016

1st: "FD2" is already defined. Un-define it then re-define it, or simply remove the define you have on your gamemode.

Example:
pawn Код:
#undef FD2
#define FD2(...) ...
2nd. You have the variable "Admin" defined two times in one instance. Change the name of one or remove one of the declarations.

P.S. Don't copy and paste, it won't work, they are just examples.


Re: Warning PLS Help me - Dainteresebuli - 06.01.2016

148: #define FD2!strcmp(PlayerInfo[playerid][pNames], "Alex_Flix", true) //
56233: new Admin = PlayerInfo[i][pAdmin];


Re: Warning PLS Help me - SickAttack - 06.01.2016

Create a function instead:
pawn Код:
stock FD2(playerid)
{
    new admin_level;
    if(!strcmp(PlayerInfo[playerid][pNames], "Alex_Flix", true))
    {
        admin_level = PlayerInfo[i][pAdmin];
    }
    return admin_level;
}
I don't think this is what you are aiming for, since you could just use "PlayerInfo[i][pAdmin]". But yeah, use a function instead.


Re: Warning PLS Help me - Dainteresebuli - 06.01.2016

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Create a function instead:
pawn Код:
stock FD2(playerid)
{
    new admin_level;
    if(!strcmp(PlayerInfo[playerid][pNames], "Alex_Flix", true))
    {
        admin_level = PlayerInfo[i][pAdmin];
    }
    return admin_level;
}
I don't think this is what you are aiming for, since you could just use "PlayerInfo[i][pAdmin]". But yeah, use a function instead.
This Code is For :148? or 56233 ?


Re: Warning PLS Help me - SickAttack - 06.01.2016

Quote:
Originally Posted by Dainteresebuli
Посмотреть сообщение
This Code is For :148? or 56233 ?
Both.