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

getGroup error #182

Closed
whiztler opened this issue Oct 14, 2015 · 3 comments
Closed

getGroup error #182

whiztler opened this issue Oct 14, 2015 · 3 comments
Milestone

Comments

@whiztler
Copy link

getGroup throws an error:

18:52:24 Error in expression <me _this) == "GROUP") exitwith {_this};
group _this
}>
18:52:24 Error position: <group _this
}>
18:52:24 Error group: Type Array, expected Object
18:52:24 File x\cba\addons\common\fnc_getGroup.sqf, line 24

Called from taskPatrol:

[_g, _spawnPos, 350, 4, "MOVE", "SAFE", "RED", "LIMITED", "", "", [0,0,0]] call CBA_fnc_taskPatrol;

Where _g is a valid group.

Possible fix for getGroup:

    params ["_g"];
    if (tolower (typeName _g) == "GROUP") exitwith {_g};
    group _g

Currently functions that call CBA_fnc_getGroup break scripts (and missions).

Possible to release a hotfix?

@jokoho48
Copy link
Member

this fix the issue 6a4ab28 but this is not in release

@MikeMatrix
Copy link
Contributor

Maybe we should auto transform the parameter, if it's given in array form. Makes sense anyways imo, and keeps call styles more consistent, to avoid errors like these.

@whiztler
Copy link
Author

Bit of compliancy will go a long way.

Pass in array:

[x] call CBA_fnc_XXX

Define a local var in the function:

params ["_passedVar"];

Afaik this is used in most CBA functions.

@Killswitch00 Killswitch00 added this to the 2.1.2 milestone Oct 15, 2015
Killswitch00 added a commit that referenced this issue Oct 17, 2015
Make getGroup more robust. Fixes #182
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants