zen-mod / ZEN

Zeus enhancement mod for Arma 3
https://zen-mod.github.io/ZEN
GNU General Public License v3.0
111 stars 49 forks source link

Formatting error in dialog will re-execute last working module #678

Closed IR0NSIGHT closed 2 years ago

IR0NSIGHT commented 2 years ago

Arma 3 Version: x.xx (stable / rc / dev) CBA Version: 3.x.x (stable / dev + commit hash) ZEN Version: 1.x.x (stable / dev + commit hash) Mods:

Description: I made a formatting error in my slider dialogue, where code formats a number:

        [
            "SLIDER",
            ["Lethal Range","Will accurately destroy all aircraft inside this radius."],
            [-1,5000,-1,{if (_this < 0) exitWith {"disabled"};  _this}],    //<< _this is number, return must be string
            false
        ],

upon execution some deep error popped up complaining the a number was returned (_this is a number) and not a string. when i try to use the "broken" module again, it instead reverts to the last module used that wasnt broken => it re-opens the dialogue to a different module.

Just a tiny, edgecase "bug". Ignore if you like

mharis001 commented 2 years ago

Not a bug. The formatting is expected to always return a string that is used to set the text for the edit box.