Skip to content

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

that-edward
Copy link
Contributor

@that-edward that-edward commented Mar 30, 2020

Resolves #511

Changes proposed in this pull request:

  • Move call compile to parseSimpleArray where possible.

  • I have tested my changes and corrected any errors found

Copy link
Member

@DomT602 DomT602 left a 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];
Copy link
Member

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.

Copy link
Contributor

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];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again here

Copy link
Contributor

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];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here

@that-edward that-edward requested a review from DomT602 June 6, 2020 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants