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

FixFloating Error #2621

Closed
jonpas opened this issue Sep 27, 2015 · 7 comments
Closed

FixFloating Error #2621

jonpas opened this issue Sep 27, 2015 · 7 comments

Comments

@jonpas
Copy link
Member

jonpas commented Sep 27, 2015

ACE3 Version: 3.3.2.0 f77242f (latest master)

The below error pops up when releasing a carried or dragged object of specific type - in this case a chair, for example Land_CampingChair_V2_F, happens with other chairs as well. Apparently it's because they don't have hitpoints.

2:00:48 Error in expression <arams ["_array", "_code"];


_array = + _array;

{
_array set [_forEachIndex, _x>
 2:00:48   Error position: <_array;

{
_array set [_forEachIndex, _x>
 2:00:48   Error foreach: Undefined variable in expression: _array
 2:00:48 File z\ace\addons\common\functions\fnc_map.sqf, line 7
 2:00:48 Error in expression <n_fnc_getHitpoints;
_hitPointDamages = [_hitPoints, {_object getHitPointDamage _>
 2:00:48   Error position: <_hitPoints, {_object getHitPointDamage _>
 2:00:48   Error Undefined variable in expression: _hitpoints
 2:00:48 File z\ace\addons\common\functions\fnc_fixFloating.sqf, line 14
@jonpas
Copy link
Member Author

jonpas commented Sep 27, 2015

Invalid, I was actually not on latest master, damn you Git 🍌

@jonpas jonpas closed this as completed Sep 27, 2015
@PabstMirror
Copy link
Contributor

Drag/carry doesn't seem to be enabled for those chairs, should it?

@jonpas
Copy link
Member Author

jonpas commented Sep 27, 2015

No, but I was adding it for #2620 if there are objections, write it there of course. :)

This issue has been fixed by #2601 for reference.

@PabstMirror
Copy link
Contributor

Excellent, was just checking because I didn't see them.

@commy2
Copy link
Contributor

commy2 commented Sep 27, 2015

This is not fixed in master. It is however fixed in #2598.

Commit: 1de3343#diff-9bb10d0be40dd380ce136f7f6a480058R24

It was introduced when I replaced the stuff in FUNC(getHitpoints) with getAllHitpointsDamage.

getAllHitpointsDamage is supposed to return an array containing 3 arrays:
[[<HITPOINTS>],[<SELECTIONS>],[<DAMGE_VALUES>]],
but when used on an object without any hitpoints it simply returns [] instead of [[],[],[]], which I consider as a bug personally. I missed that in my testing initially.

Btw.
https://community.bistudio.com/wiki/getAllHitPointsDamage
claims that the return value is a number.

@jonpas
Copy link
Member Author

jonpas commented Sep 27, 2015

Well, I am not getting the error after I merged master into my branch (and realised I am behind before that), so it must have been something in master that fixed that particular case.

That BI wiki page says "Return Value: Array" for me.

@commy2
Copy link
Contributor

commy2 commented Sep 27, 2015

Oh yes. NVM, fixed that particular case in #2601. Root cause isn't fixed though. At least in master.

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

3 participants