error 033 giving rep
#1

well i have made a command to give the player -pot,like take pot from him and he is offline,i made:
pawn Code:
CMD:opot(playerid, params[])
{
    new pot[128], target[MAX_PLAYER_NAME], amount;
    if(pInfo[playerid][pAdminLevel] >= 1)
    {
        if(!sscanf(params, "s[128]d", target, amount))
        {
            format(targetname, sizeof(targetname), "%s.ini",target);
            if(dini_Exists(target))
            {
                        pot = dini_Get(targetname, "Pot");
                dini_IntSet(target, "Pot", pot-amount);
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, "That player does not exist!");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "USAGE: /opot [full name] [amount]");
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command !");
    }
    return 1;
}
and iget this error:
pawn Code:
error 033: array must be indexed (variable "pot")
what to do?
Reply


Messages In This Thread
error 033 giving rep - by iBots - 22.04.2014, 12:54
Re: error 033 giving rep - by Jochemd - 22.04.2014, 12:57
Re: error 033 giving rep - by iBots - 22.04.2014, 13:49

Forum Jump:


Users browsing this thread: 2 Guest(s)