error 047: array sizes do not match, or destination array is too small - 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: error 047: array sizes do not match, or destination array is too small (
/showthread.php?tid=645084)
error 047: array sizes do not match, or destination array is too small -
iDark - 19.11.2017
Hello,
I have this function
Код:
stock GetItemName(item)
{
new name[30];
switch(item)
{
case 333 .. 372: name = WeaponName[item];
case 19563: name = "Orange Juice";
}
return name;
}
and when I try to use in
Код:
stock ShowItems(playerid)
{
new list[500], quantity;
for(new x; x < MAX_INVENTORY_ITEMS; x++)
{
format(list, sizeof(list), "%s%s\n", list, BR_GetItemName(inv_items[playerid][x][iObject]));
}
ShowPlayerDialog(playerid, DIALOG_INVENTORY, DIALOG_STYLE_LIST, "Inventory", list, "Select", "Close");
return 1;
}
I get error 047: array sizes do not match, or destination array is too small