-
Notifications
You must be signed in to change notification settings - Fork 148
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
add default value for CBA_fnc_serializeNamespace #1044
add default value for CBA_fnc_serializeNamespace #1044
Conversation
I can't test this ingame, but my brain debugger tells me, that this will error in scheduled environment if no or nil default value is proved. 0 spawn {
objNull call CBA_fnc_serializeNamespace;
}; -> error undefined variable in expression. This should not error before this PR. |
Where can I download this brain debugger!? |
@commy2 any suggestions? Having a Don't wanna break the legacy here |
Replace
Years of pain and suffering through these exact same issues. |
lgtm now |
0 spawn {
a = [] call CBA_fnc_createNamespace;
a setVariable ["a", 1];
a = a call CBA_fnc_serializeNamespace;
a = [a] call CBA_fnc_deserializeNamespace;
private _a = a getVariable "a";
a call CBA_fnc_deleteNamespace;
hint str [a, _a] // [No location,1]
}; works |
0 spawn {
a = [] call CBA_fnc_createNamespace;
a setVariable ["a", 1];
a = [a, 0] call CBA_fnc_serializeNamespace;
_a = [a, "a"] call CBA_fnc_hashGet;
_b = [a, "b"] call CBA_fnc_hashGet;
_c = [a, "c", -1] call CBA_fnc_hashGet;
hint str [_a, _b, _c]; // [1,0,-1]
}; works |
works |
When merged this pull request will:
fnc_serializeVariable
I needed this for my mod project since I use this function but was missing the defaultValue I was used to when using
fnc_hashCreate