[Ajuda] Warning Chato!!!
#1

Seguinte to com um warning aki tenso mano tentei arrumar umas pa de vez e nunca da certo quem vai ajudar eu ai??
eRRO::
Код HTML:
(8342) : warning 219: local variable "string" shadows a variable at a preceding level
Linha do erro:::
Код HTML:
{
			new string[256];
			new AdminName[MAX_PLAYER_NAME];
			GetPlayerName(playerid, AdminName, sizeof(AdminName));
    		format(string, sizeof(string), "~y~%s: ~r~OFF", AdminName);

				for(new i=0; i<MAX_PLAYERS; i++)
				{
    			GameTextForPlayer(i, string , 5000, 1);
				}
		}
}
Reply
#2

pawn Код:
string[256];
Jб estб definida em algum Lugar
Reply
#3

Basta apagar new string[256];
Reply
#4

fora que se nгo tivesse 256 seria uma poco demais para uma coisa de 37 string =/
Reply
#5

Coloca assim:

pawn Код:
{
            new lol22[256];
            new AdminName[MAX_PLAYER_NAME];
            GetPlayerName(playerid, AdminName, sizeof(AdminName));
            format(lol22, sizeof(lol22), "~y~%s: ~r~OFF", AdminName);

                for(new i=0; i<MAX_PLAYERS; i++)
                {
                GameTextForPlayer(i, lol22 , 5000, 1);
                }
        }
}
Que irб acabar com seu erro.
Reply
#6

Quote:
Originally Posted by s4kuL
Посмотреть сообщение
Coloca assim:

pawn Код:
{
            new lol22[256];
            new AdminName[MAX_PLAYER_NAME];
            GetPlayerName(playerid, AdminName, sizeof(AdminName));
            format(lol22, sizeof(lol22), "~y~%s: ~r~OFF", AdminName);

                for(new i=0; i<MAX_PLAYERS; i++)
                {
                GameTextForPlayer(i, lol22 , 5000, 1);
                }
        }
}
Que irб acabar com seu erro.
Valeu ai mano Abraзo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)