26.10.2016, 02:50
I've ran into an issue where this warning shows up with a command.
When I use the command, it performs like it's suppose to, it's just that warning shows up in the server logs.
pawn Код:
CMD:inventory(playerid,params[])
{
new choice[6],slot;
if(isnull(params)) return SCM(playerid,COLOR_GREY,"Command Usage: /i(nventory) [info|use|move|give|split|drop]");
sscanf(params,"s[6]i,",choice,slot);
//code here
else if(!strcmp(choice,"drop",true))
{
new amount;
if(sscanf(params,"s[6]iI(1)",choice,slot,amount)) return SCM(playerid,COLOR_GREY,"Command usage: /i(nventory) drop [slotid] [optional:amount]");
switch(slot)
{
case 1..20:
{
if(IsInventorySlotEmpty(playerid,slot-1)) return SCM(playerid,COLOR_GREY,"That slot is empty.");
DropItem(playerid,slot-1,amount);
}
default: { SCM(playerid,COLOR_GREY,"That is an invalid slot."); return 1; }
}
}
else return SCM(playerid,COLOR_GREY,"Command Usage: /i(nventory) [info|use|move|give|split|drop]");
return 1;
}