function f(item)
local count = 0
for i = 1, getContainerSize(item) do
local v = getContainerItem(i)
if v ~= 0 then
count = count + isContainer(v.uid) and f(v.uid) or 1
end
end
return count
end
function f(item)
local count = 0
for i = 1, getContainerSize(item) do
local v = getContainerItem(i)
if v ~= 0 then
count = count + (isContainer(v.uid) and f(v.uid) or 1)
end
end
return count
end
function f(item)
local count = 0
for i = 1, getContainerSize(item) do
local v = getContainerItem(i)
if v ~= 0 then
count = count + (isContainer(v.uid) and f(v.uid) or 1)
end
end
return count
end
dlaczego raz przekazujecie item a raz jego uid?
Dokladnie tak jest.@up
bo w domyśle funkcji przekazuje się uid a nie całą tablice item
@edit
szczerze to nie ogarniam w tej chwili tego skryptu, musze chyba pokombinować i napisać sam coś podobnego