Code:
local Add2Items = function (Chest)
-- Chest is of type cChestEntity, currently very under-API-ed
Chest:SetSlot(1, Item1);
Chest:SetSlot(2, Item2);
end
Just to clear up something, could that code be rewritten as:
Code:
local function Add2Items(Chest)
--...
Chest:SetSlot(1, Item1);
Chest:SetSlot(2, Item2);
end
If they aren't, what's the difference?