M
M
Mazino2018-09-03 20:47:45
Lua
Mazino, 2018-09-03 20:47:45

Where did I go wrong in the checkCells() function?

I am writing a control program in Lua for a nuclear reactor in the minecraft game using the OpenComputers mod.
Wrote several functions that check the conditions that must be met for the reactor to work.
The problem is that when emptying any slots in the inventory of the reactor, except for slots under the indices 1,14, 12 and 1 more. The function does not return false. Also, when exiting by false, the part of the transferCells function, which is responsible for loading cells, does not work. But it works correctly if the function returns false and more than 1 slot is empty. I can't figure out where I went wrong.
Code https://pastebin.com/2XEy4eb4

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question