Problem. 4 Warnings. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem. 4 Warnings. (
/showthread.php?tid=232151)
Problem. 4 Warnings. -
Manuwar - 27.02.2011
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
AW: Problem. 4 Warnings. -
BlackWolf120 - 27.02.2011
just remove the first 4 returns and everything should be fine.
A return interrupts a loop and prevents the code to be red.
Re: Problem. 4 Warnings. -
Manuwar - 27.02.2011
Thanks a lot! Is Fixed now ^^
AW: Problem. 4 Warnings. -
BlackWolf120 - 27.02.2011
np, happy i could help