Problem. 4 Warnings.
#1

Hi guys, I have a problem with my gm, i have 4 warnings for this code.
Код:
    {
    new string[50];
    format(string, sizeof(string), "GROOVE", playerid);
    GameTextForPlayer(playerid, string, 3000, 4);
}
	return 1;
    {
    new string[50];
    format(string, sizeof(string), "BALLAS", playerid);
    GameTextForPlayer(playerid, string, 3000, 4);
}
	return 1;
	{
    new string[50];
    format(string, sizeof(string), "VAGOS", playerid);
    GameTextForPlayer(playerid, string, 3000, 4);
}
	return 1;
    {
    new string[50];
    format(string, sizeof(string), "POLIZIA", playerid);
    GameTextForPlayer(playerid, string, 3000, 4);
}
	return 1;
    {
    new string[50];
    format(string, sizeof(string), "AZTECAS", playerid);
    GameTextForPlayer(playerid, string, 3000, 4);
}
	return 1;
}
The Warnings are:
warning 225: unreachable code
warning 225: unreachable code
warning 225: unreachable code
warning 225: unreachable code

What i done wrong? Thanks for help.

P.S. I'm a Really noob with pawno XD
Reply
#2

just remove the first 4 returns and everything should be fine.
A return interrupts a loop and prevents the code to be red.
Reply
#3

Thanks a lot! Is Fixed now ^^
Reply
#4

np, happy i could help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)