Moon Logic deprecated

by mk-fg

Adds Lua-programmable circuit network combinator. Based on Sandboxed LuaCombinator and LuaCombinator2 mods. Probably won't work in multiplayer games.

Content
2 years ago
1.0 - 1.1
4.97K
Circuit network

b [not-a-bug] Parsing error

6 months ago
(updated 6 months ago)

there seems to be an error in the parsing of the combinator :

local maxStack = 2
out['signal-H'] = maxStack
local inSignal = green['wood']
local outSignal = 0
if (inSignal < maxStack) then
outSignal = inSignal
end

there is a wrong variable name in the screenshot, but the error does not change at all even if it was the correct variable name , this was an attempt to see if it go to the 2nd variable before the parser errored out, but no, it seems to happen at the =

the error says it's expecting a ']' near the = on line 6

here's the in-game screenshot of it :
https://imgur.com/a/mEZc7j8

as far as I know this code seems completely fine, if a little useless (didn't get past the 1st if in what i planned on making)

is this a bug within the parser or did I do something stupid that i've been overlooking?

6 months ago

Fixed, since I added the mod later, it'd hadn't gone through it's map init properly and was parsing all wrong!

6 months ago

Hm, don't think it inits anything about the map, only keeps track of newly-built moon-logic combinators after you place them, and that's it.

But dunno about the issue either, code looks ok.
Red markup "smeared" across two lines seem to suggest manual edits after it marked the line with error, so maybe just fixed the issue and forgot to press Save button/hotkey?

6 months ago

Also "ironSignal" there should probably be "inSignal", as might be undefined otherwise, unless happened to be stored in a global var earlier.

New response