Closed Luashine closed 11 months ago
Hey I missed this opened tab:
Hi. Is there any way to make JassHelper shut up about it? I'm aware it's been added to pJass way back now, and I'm using the newest version, but when JassHelper runs in WE, it still throws a syntax error since it doesn't recognize the % operator added in 1.29.
Is it somehow possible to make it a warning, not an error for the people who are targetting 1.26 and others?
Is it somehow possible to make it a warning, not an error for the people who are targetting 1.26 and others?
Well that is possible but i don't quite see the use-case; the script would not be useable under older patches anyway so why only emit a warning? I can add a flag like +nomodulooperator
which would simply error on any %
usage. I could also do the same with a warning instead but see above. The difference between warning and error would be the return code of pjass.exe
which i guess jasshelper uses to see if pjass found errors? At least that's what i hope jasshelper does.
Yeah you're right about JassHelper. I don't think anybody even knows about pjass backing it.
Yes a flag is a good choice. I'm just thinking how likely is that someone's gonna run JassHelper/pjass for an old game version, not working due to %, but also not knowing about an optional flag. Tough luck and rtfm I guess? At some point, game version (w3i) detection could be added to JassHelper if I so insist...
Fixed by 501313704ffcc977d49b13d2160fd724b7070eac
https://github.com/lep/pjass/blob/ac58f84a23afe447621dff7ffd84e36a92295817/tests/should-check/modulo.j
I have tested the modulo operator in 1.27 and it's definitely breaking the script:
vs