Page 1 of 1
[0.12.20] Given entity does not have circuit condition
Posted: Tue Dec 08, 2015 3:59 pm
by MrDoomah
When calling
Code: Select all
local condition = inserter.get_circuit_condition(defines.circuitconnector.red)
on a smart inserter I get this error: "Given entity does not have circuit condition with index: 0".
defines.circuitconnector.green and defines.circuitconnector.logistic do work, as do indexes 1,2. 0 and 3 do not work.
Re: [0.12.20] Given entity does not have circuit condition
Posted: Tue Dec 08, 2015 4:33 pm
by kovarex
Hello, this was a error in the documentation.
it should be called:
Code: Select all
local condition = inserter.get_circuit_condition(defines.circuitconditionindex.inserter_circuit)
Re: [0.12.20] Given entity does not have circuit condition
Posted: Tue Dec 08, 2015 4:49 pm
by MrDoomah
Thank you for the quick reply. In that case I've got another error. In defines:
Code: Select all
circuitconditionindex =
{
inserter_circuit = 1,
inserter_logistic = 1, <-- this should be 2?
lamp = 1,
arithmetic_combinator = 1,
decider_combinator = 1,
constant_combinator = 1,
offshore_pump = 1,
pump = 1
}
Since now both
Code: Select all
inserter.get_circuit_condition(defines.circuitconditionindex.inserter_circuit)
inserter.get_circuit_condition(defines.circuitconditionindex.inserter_logistic)
yield the circuit condition and not the logistic condition.
Re: [0.12.20] Given entity does not have circuit condition
Posted: Tue Dec 08, 2015 4:52 pm
by Oxyd
MrDoomah wrote:Thank you for the quick reply. In that case I've got another error. In defines:
Code: Select all
circuitconditionindex =
{
inserter_circuit = 1,
inserter_logistic = 1, <-- this should be 2?
lamp = 1,
arithmetic_combinator = 1,
decider_combinator = 1,
constant_combinator = 1,
offshore_pump = 1,
pump = 1
}
Since now both
Code: Select all
inserter.get_circuit_condition(defines.circuitconditionindex.inserter_circuit)
inserter.get_circuit_condition(defines.circuitconditionindex.inserter_logistic)
yield the circuit condition and not the logistic condition.
That's a part of the bug, yes. kovarex did fix it as well.

Re: [0.12.20] Given entity does not have circuit condition
Posted: Tue Dec 08, 2015 5:12 pm
by MrDoomah
Awesome, you're all doing great work!