Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent script error on comment lines in settings file #1273

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion addons/settings/fnc_parse.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ _result = [];
private _indexEqualSign = _x find "=";

private _setting = (_x select [0, _indexEqualSign]) call CBA_fnc_rightTrim;
private _value = ((_x select [_indexEqualSign + 1]) call CBA_fnc_trim) call _fnc_parseAny;
private _priority = 0;

if (_setting select [0, count "force"] == "force") then {
Expand All @@ -68,6 +67,8 @@ _result = [];
};

if (_setting != "") then {
private _value = ((_x select [_indexEqualSign + 1]) call CBA_fnc_trim) call _fnc_parseAny;

if !(_validate) then {
_result pushBack [_setting, _value, _priority];
} else {
Expand Down