If statements and switch statements seem to not work at all, they execute the code in their block even if the condition isn't met.
Description
Description
Details
Details
- Legacy ID
- 1254464786
- Severity
- Major
- Resolution
- Not A Bug
- Reproducibility
- Always
- Category
- Scripting
Steps To Reproduce
- Create init.sqf
- Add below code to file:
_which_one = "two"
if (_which_one == "three") then
{
hintSilent "derp";
};
- Add unit to map and under initialization add code []exec "init.sqf"
- Watch as the hint is displayed on the screen.
Additional Information
This is reproducible with switch statements as well.
Event Timeline
Comment Actions
Like DarkDruid said, use the execVM command to execute sqf scripts. It works fine, I just tested it.