-
Notifications
You must be signed in to change notification settings - Fork 311
Parse simple array #641
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
base: master
Are you sure you want to change the base?
Parse simple array #641
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea however, this needs to be thought about more carefully as not every use of call compile can translate into parseSimpleArray. I've marked a few examples but there are more.
@@ -24,7 +24,7 @@ if (str(_target) in LIFE_SETTINGS(getArray,"delivery_points")) then { | |||
life_dp_start = _target; | |||
life_delivery_in_progress = true; | |||
|
|||
life_dp_point = call compile format ["%1",_dp]; | |||
life_dp_point = parseSimpleArray format ["%1",_dp]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've gotta be careful, not every call compile can become parseSimpleArray. In this instance, there is no array, as once compiled its an object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that could become missionNamespace getVariable _dp
tho :)
or maybe missionNamespace getVariable [_dp, objNull]
with isNull check to be safe
@@ -8,7 +8,7 @@ | |||
if (FETCH_CONST(life_adminlevel) < 4) exitWith {closeDialog 0; hint localize "STR_ANOTF_ErrorLevel";}; | |||
|
|||
private _unit = lbData[2902,lbCurSel (2902)]; | |||
_unit = call compile format ["%1", _unit]; | |||
_unit = parseSimpleArray format ["%1", _unit]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't touch these, I want to do them in a seperate pr (already prepared that one)
@@ -8,7 +8,7 @@ | |||
https://community.bistudio.com/wiki/Multiplayer_Server_Commands | |||
*/ | |||
private _unit = lbData[2902,lbCurSel (2902)]; | |||
_unit = call compile format ["%1", _unit]; | |||
_unit = parseSimpleArray format ["%1", _unit]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here
Resolves #511
Changes proposed in this pull request:
Move
call compile
toparseSimpleArray
where possible.I have tested my changes and corrected any errors found