ComputerCraft Forums

ComputerCraft => Ask a Pro => Topic started by: Terandox on Jun 03, 2021, 05:36 PM

Title: For Loop is skipped every time
Post by: Terandox on Jun 03, 2021, 05:36 PM
I'am creating an Storage System, but im not able no get it to work, because 1 for loop is skiped every time.

I tried 36 Hours to fix it but i cant... please help

here is my code: https://pastebin.com/sdkT9bZ3

this is the skiped for loop:
for slotID,slot in pairs(myslots) do
 print("#3")
 local counterC=chests[data.id].chest.getItemDetail(slot).count
 if counterC > remainder then counterC = remainder end
 print("counterC : "..counterC)
 local debug= pushto(slot,data.id,data.name,counterC,nil,false,false,false,item)
 remainder=remainder-counterC
 end
Title: For Loop is skipped every time
Post by: Lupus590 on Jun 03, 2021, 08:35 PM
Where is getSlots defined? It might be returning an empty table.