[HELP] warning 225: unreachable code - 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)
+--- Thread: [HELP] warning 225: unreachable code (
/showthread.php?tid=602860)
[HELP] warning 225: unreachable code -
xxxSpeedxxx - 14.03.2016
The cmds..
PHP код:
CMD:vposao(playerid,params)
{
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][VIPLevel] >= 4)
{
if (GetPlayerWantedLevel(playerid) < 1)
{
// Check if the player is not jailed
if (APlayerData[playerid][PlayerJailed] == 0)
{
if(APlayerData[playerid][DM] == 0)
{
SetPlayerPos(playerid,1481.101, -1769.8872, 18.795);
}
else
SendClientMessage(playerid,COLOR_RED,"ERROR: Moras biti VIP lvl 4 da bi Komandao ovu komandu");
}
SendClientMessage(playerid, 0xFF0000FF, "Ne mozes koristiti tu komandu dok si zatvoren!");
}
else
SendClientMessage(playerid, 0xFF0000FF, "Imas wanted level!");
}
else
SendClientMessage(playerid, 0xFF0000FF, "Ne mozes koristiti /vposao dok si u DM areni!");
}
return 0;
return 1;
}
CMD:vbanka(playerid,params)
{
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][VIPLevel] >= 4)
{
if (GetPlayerWantedLevel(playerid) < 1)
{
// Check if the player is not jailed
if (APlayerData[playerid][PlayerJailed] == 0)
{
if(APlayerData[playerid][DM] == 0)
{
SetPlayerPos(playerid,1462.1396,-1026.6476,23.8520);
}
else
SendClientMessage(playerid,COLOR_RED,"ERROR: Moras biti VIP lvl 4 da bi Komandao ovu komandu");
}
SendClientMessage(playerid, 0xFF0000FF, "Ne mozes koristiti tu komandu dok si zatvoren!");
}
else
SendClientMessage(playerid, 0xFF0000FF, "Imas wanted level!");
}
else
SendClientMessage(playerid, 0xFF0000FF, "Ne mozes koristiti /vbanka dok si u DM areni!");
}
return 0;
return 1;
}
The warnings,REP+1 who helps me out...
Код:
C:\Users\Freeware Sys\Documents\srw\include\PlayerCommands.inc(7321) : warning 225: unreachable code
C:\Users\Freeware Sys\Documents\srw\include\PlayerCommands.inc(7352) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
Re: [HELP] warning 225: unreachable code -
zPain - 14.03.2016
Remove the
return 0; statement on both commands.
Re: [HELP] warning 225: unreachable code -
saffierr - 14.03.2016
Possibly remove both of the
...?
Re: [HELP] warning 225: unreachable code -
xxxSpeedxxx - 14.03.2016
Fixed,thanks.
Re: [HELP] warning 225: unreachable code -
Infinity - 14.03.2016
It would also help if you would fix your indentation. (And remove the #pragma you inevitably have at the top of your script)