what is this ?
#1

Код:
.pwn(1556) : warning 219: local variable "pName" shadows a variable at a preceding level
.pwn(2588) : warning 209: function "OnPlayerDeath" should return a value
.pwn(3893) : warning 219: local variable "PlayerName" shadows a variable at a preceding level


lines 1556, 1557
new pName[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, pName, sizeof(pName));

lines 2585 - 2589 

         2585-    }
			return 1;
		}
	}
2589- 

and from 3888 - 3893 
stock pName(playerid)
{
	new PlayerName[MAX_PLAYER_NAME];
	GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
	return PlayerName;
}
Reply
#2

Not to use variable names doubly!

pawn Код:
new pName2[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName2, sizeof(pName2));
pawn Код:
stock pName(playerid)
{
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    return PlayerName;
}
Reply
#3

you defined pName & PlayerName two times ,that s why its giving you this error .Remove new pName[MAX_PLAYER_NAME]; and PlayerName one time from your script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)