04.05.2011, 21:05
Bom eu to com uma warning do caramba!
C:\Users\EletroHouse\Desktop\Nova pasta (3)\gamemodes\BeC2.PWN(85817) : warning 219: local variable "sendername" shadows a variable at a preceding level
desse code aqui:
alguem sabe qual й o erro?
C:\Users\EletroHouse\Desktop\Nova pasta (3)\gamemodes\BeC2.PWN(85817) : warning 219: local variable "sendername" shadows a variable at a preceding level
desse code aqui:
pawn Код:
public filaaa(playerid,plo)
{
new Float:plocx,Float:plocy,Float:plocz;
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
new nome[24];
GetPlayerName(playerid, nome, sizeof nome);
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(PlayerInfo[plo][pAge] << 0)
{
if(Spectate[playerid] != 255)
{
Spectate[playerid] = 256;
}
GetPlayerPos(plo, plocx, plocy, plocz);
if(PlayerInfo[plo][pInt] > 0)
{
SetPlayerInterior(playerid,PlayerInfo[plo][pInt]);
PlayerInfo[playerid][pInt] = PlayerInfo[plo][pInt];
PlayerInfo[playerid][pLocal] = PlayerInfo[plo][pLocal];
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(playerid,0);
}
if(plocz > 530.0 && PlayerInfo[plo][pInt] == 0) //the highest land point in sa = 526.8
{
SetPlayerInterior(playerid,1);
PlayerInfo[playerid][pInt] = 1;
}
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid,plocx,plocy+2, plocz);
}
new giveplayer[256];
new sendername[256];
new string[256];
GetPlayerName(plo, giveplayer,256);
GetPlayerName(playerid, sendername,256);
format(string, sizeof(string), "**Vocк foi atender ao chamado de %s.", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "**O admin %s, veio para te atender.", sendername);
SendClientMessage(plo, COLOR_WHITE, string);
new string2[256];
format(string2, sizeof(string), "**O Admin %s foi atender o player %s.", giveplayer,sendername);
ABroadCast(COLOR_ALERTA,string2,1);
PlayerInfo[plo][pAge] = 0;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "O player nгo estб na fila.");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб autorizado a usar este comando.");
}
}
}
else
{
new string2[256];
format(string2, sizeof(string2), " %d nгo й um player ativo.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string2);
}
}