[0.12.20] Given entity does not have circuit condition

This subforum contains all the issues which we already resolved.
MrDoomah
Fast Inserter
Fast Inserter
Posts: 196
Joined: Mon Jun 01, 2015 1:11 pm
Contact:

[0.12.20] Given entity does not have circuit condition

Post by MrDoomah »

Image

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.
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.12.20] Given entity does not have circuit condition

Post 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)
MrDoomah
Fast Inserter
Fast Inserter
Posts: 196
Joined: Mon Jun 01, 2015 1:11 pm
Contact:

Re: [0.12.20] Given entity does not have circuit condition

Post 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.
Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [0.12.20] Given entity does not have circuit condition

Post 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. :)
MrDoomah
Fast Inserter
Fast Inserter
Posts: 196
Joined: Mon Jun 01, 2015 1:11 pm
Contact:

Re: [0.12.20] Given entity does not have circuit condition

Post by MrDoomah »

Awesome, you're all doing great work!
Post Reply

Return to “Resolved Problems and Bugs”