PDA

View Full Version : Warning PLS Help me


Dainteresebuli
06/01/2016, 07:05 AM
C:\Users\Kosta\Desktop\615_test_rp_gm_\gamemodes\g m.pwn(146) : warning 201: redefinition of constant/macro (symbol "FD2")
C:\Users\Kosta\Desktop\615_test_Rp_gm_\gamemodes\g m.pwn(56233) : warning 219: local variable "Admin" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.


Help me pls To Fix This problem some 1 :rolleyes:

Amunra
06/01/2016, 07:07 AM
Show your Code xD

Dainteresebuli
06/01/2016, 07:17 AM
Wich Content? i am noob tho :)

Karan007
06/01/2016, 07:19 AM
Show us the line 146 & 56233.

SickAttack
06/01/2016, 07:23 AM
1st: "FD2" is already defined. Un-define it then re-define it, or simply remove the define you have on your gamemode.

Example:
#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.

Dainteresebuli
06/01/2016, 07:23 AM
148: #define FD2!strcmp(PlayerInfo[playerid][pNames], "Alex_Flix", true) //
56233: new Admin = PlayerInfo[i][pAdmin];

SickAttack
06/01/2016, 07:27 AM
Create a function instead:
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.

Dainteresebuli
06/01/2016, 07:28 AM
Create a function instead:
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 ?

SickAttack
06/01/2016, 08:28 PM
This Code is For :148? or 56233 ?

Both.