我的问题是打印时价格不变
我从excel那里获得的价格
我想阅读一个单元格,然后打印价格并保持变化
local t = {1,2,3,4,5}
local t2 = {}
--code below runs in a loop, code above doesnt
table.insert(t2, t[1] + t[2])
table.remove(t, 1)
table.remove(t, 1)
for i,v in pairs(t) do
table.insert(t2, v)
end
table.insert(t, t2[1] + t2[2])
table.remove(t2, 1)
table.remove(t2, 1)
for i,v in pairs(t2) do
table.insert(t, v)
end
print(#t) -- total values in t just went higher than before, doesnt work.