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
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?