Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

What GMS1 version are you using? Ternary operators are supported in extensions from 1.4.1763 and onwards.

If you need to target an ancient version, define sfgml_version=1.4.1700 or whatever

(4 edits)

I'm using 1.4.9999.

This is the error:

Error : got '?' expected ')'

Edit: putting a few more bracers in the generated code solved it. Essentially, there is a statement with multiple ternary operators, and I changed them like that:

(a) ? b : c --> ((a) ? b : c)

And it worked perfectly afterwards. Any idea on why it doesn't work out of the box?

Pushed a fix for that on git.

Wow, thought this was complicated and wasn't expecting a fix that fast. Many thanks!