"Greater/lesser or equal" operators are not parsed when their signs are swapped
The main script of the latest R14 version of Mastering Magicka mod uses lesser or equal operator (<=) with swapped signs (=<) on the 215th line which OpenMW cannot parse and thus fails to compile the script ("unexpected < sign"). Although presumable typo, this "spelling" of the operator works fine in the original engine according to the mod author.
Same goes for >= and =>; only the first "spelling" works.
OpenMW-CS considers => and =< erroneous too.
- Status changed from New to Resolved
Confirmed that OpenMW doesn't accept =< or => and PR to fix it submitted.
From what I saw in my own testing, both of these are treated as by original Morrowind.
I also tried =, which is treated as and already supported in OpenMW.
I don't know if other things after the = are also ignored, but I tried putting an "a" after it, like =a, and that caused an error in original Morrowind, as did putting a question mark like =?. So I only know that ==, =<, => and = are all accepted as "equals."
#5 Updated by Andrei Kortunov 7 months ago
Problematic code in MM_Main_scpt script:
Set PlayerWillpowerBonus to ( ( Player->GetWillpower ) - MM_PCWillpowerMin ) If ( PlayerWillpowerBonus =< 0 ) Set PlayerWillpowerBonus to 0 EndIf If ( MM_PCWillpowerRegen > 0 ) Set WillpowerMod to ( PlayerWillpowerBonus / MM_PCWillpowerRegen ) EndIf
I think that by design "=<" supposed to work as "<=" (to disable mana regeneration when Player->GetWillpower < MM_PCWillpowerMin), not as "==".
If so, there is a bug in plugin itself.
I think we should keep a warning at least to complain about possible misunderstanding.