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

getPos is a brittle function #187

Closed
kymckay opened this issue Oct 27, 2015 · 5 comments
Closed

getPos is a brittle function #187

kymckay opened this issue Oct 27, 2015 · 5 comments
Milestone

Comments

@kymckay
Copy link
Contributor

kymckay commented Oct 27, 2015

Same deal as fix #183 for #182.

CBA_fnc_getPos uses brittle code that can't handle input in array form because it deals directly with variable _this, however it's a bit more problematic to fix and retain backwards compatibility since the parameters passed can be an array of the form [x,y,z].

@MikeMatrix
Copy link
Contributor

params ["_x", "_y", "_z"] and then check if _x is array, if so, then _x params ["_x", "_y", "_z"] as a potential solution? (didn't check if this code is viable at all)

@Killswitch00
Copy link
Contributor

Please unbrittle it and submit a PR :-)

@kymckay
Copy link
Contributor Author

kymckay commented Oct 31, 2015

Internally debating whether it's worth it 😄

Just reported for tracking purposes. If you guys think it shouldn't be then I'll go ahead and fix it

@commy2
Copy link
Contributor

commy2 commented Nov 15, 2015

Why would someone do:
[[x,y,z]] call CBA_fnc_getPos?

I guess the description states that Marker, Object, Location, Group or Position are supported (but not Task apparently) but that doesn't really make sense to me.

@kymckay
Copy link
Contributor Author

kymckay commented Nov 15, 2015

^ Commy's changes do fix it, a good solution 👍

@commy2 commy2 closed this as completed in e3a32b4 Nov 16, 2015
Killswitch00 added a commit that referenced this issue Nov 16, 2015
'unbrittle' CBA_fnc_getPos, close #187
@Killswitch00 Killswitch00 added this to the 2.2 milestone Nov 23, 2015
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

No branches or pull requests

4 participants