Warnings Help - 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: Warnings Help (
/showthread.php?tid=501250)
Warnings Help -
Mriss - 17.03.2014
Warning >
pawn Код:
(2401) : warning 225: unreachable code
Command>
pawn Код:
CMD:giveallcash(playerid, params[])
{
new value;
if(pInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_RED,"[ERROR]: "WHITE"You are not authorized to use this command.");
if(sscanf(params, "d", value) != 0) SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /giveall [Amount]"); return 1;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GivePlayerMoney(i, value);
}
}
return 1;
}
Line 2401
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
Re: Warnings Help -
]Rafaellos[ - 17.03.2014
pawn Код:
if(sscanf(params, "d", value) != 0) SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /giveall [Amount]"); return 1;
to
pawn Код:
if(sscanf(params, "d", value) != 0) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /giveall [Amount]");
Re: Warnings Help -
Mriss - 17.03.2014
Thanks
+repped
Re: Warnings Help -
Equuuuin0X - 17.03.2014
remove the return 1; on above of it
EDIT: nvm, too late to reply -_-