Warnings Help
#1

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++)
Reply
#2

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]");
Reply
#3

Thanks

+repped
Reply
#4

remove the return 1; on above of it

EDIT: nvm, too late to reply -_-
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)