local variable "Name" shadows a variable at a preceding level
#1

My Code:

pawn Код:
stock GetName(playerid)
{
    new Name[24];
    GetPlayerName(playerid, Name, sizeof(Name));
    return Name;
}
ERROR: warning 219: local variable "Name" shadows a variable at a preceding level

Help me pls .. . thnx in advance
Reply
#2

somewhere, outside of the scope of GetName(), there is an (older) declaration of Name[];
simply change the variables' name inside:
Код:
stock GetName(playerid)
{
    new GName[24];
    GetPlayerName(playerid, GName, sizeof(GName));
    return GName;
}
Reply
#3

thank u alot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)