Page 1 of 1

[0.15.11] circuit_condition rejects new comparator signals

Posted: Wed May 17, 2017 1:49 pm
by justarandomgeek
When setting the condition on a lamp to Any!=0 with the following code:

Code: Select all

  local control = entity.get_or_create_control_behavior()
  if control.use_colors then
    control.circuit_condition = {
      condition={
        first_signal={name="signal-anything",type="virtual"},
        comparator="!=",
        constant=0,
        second_signal=nil
      },
      connect_to_logistic_network=false
    }
  end
I get an error that != is an Invalid Type Sign. Using '≠' in its place does work. The the docs indicate that != <= and >= should also work when looking at conditions on a Decider Combinator, and don't list what symbols to use for these operations at all on other circuit entities

Re: [0.15.11] circuit_condition rejects new comparator signals

Posted: Wed May 17, 2017 3:34 pm
by Twinsen
The documentation was off. Must be one of "<", ">", "=", "≥", "≤", "≠".

Fixed in Version: 0.15.12.

Re: [0.15.11] circuit_condition rejects new comparator signals

Posted: Wed May 17, 2017 3:57 pm
by steinio
Twinsen wrote:The documentation was off. Must be one of "<", ">", "=", "≥", "≤", "≠".

Fixed in Version: 0.15.12.
Which keyboard has this signs on:"≥", "≤", "≠"?
They may look nice but for modding they should be the common coders aquivalent ">=", "<=" and "<>".

Greetings, steinio.

Re: [0.15.11] circuit_condition rejects new comparator signals

Posted: Wed May 17, 2017 3:59 pm
by posila
We will probably encapsulate it into defines.

Re: [0.15.11] circuit_condition rejects new comparator signals

Posted: Wed May 17, 2017 4:00 pm
by steinio
posila wrote:We will probably encapsulate it into defines.
:thumbs up:

Re: [0.15.11] circuit_condition rejects new comparator signals

Posted: Wed May 17, 2017 4:36 pm
by justarandomgeek
I don't mind the funny characters as long as the docs have them for easy copying ;)