22.04.2014, 12:54
well i have made a command to give the player -pot,like take pot from him and he is offline,i made:
and iget this error:
what to do?
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;
}
pawn Code:
error 033: array must be indexed (variable "pot")