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

Error in fn_showWeaponInfo #4

Closed
McDiod opened this issue Sep 10, 2018 · 1 comment
Closed

Error in fn_showWeaponInfo #4

McDiod opened this issue Sep 10, 2018 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@McDiod
Copy link

McDiod commented Sep 10, 2018

20:25:54 Error in expression <mode"): { 
private _currentWeaponMode = tolower currentWeaponMode player;
privat>
20:25:54   Error position: <tolower currentWeaponMode player;
privat>
20:25:54   Error tolower: Type Number, expected String
20:25:54 File \grad_minui_weaponInfo\functions\fn_showWeaponInfo.sqf [grad_minui_fnc_showWeaponInfo], line 32

Happened on end of mission.

See:
https://community.bistudio.com/wiki/currentWeaponMode

(currentWeaponMode) will return 0 Number if given object is a vehicle instead of a person.

@DerZade DerZade added the bug Something isn't working label Nov 12, 2018
@DerZade DerZade self-assigned this Nov 12, 2018
@DerZade
Copy link
Member

DerZade commented Nov 12, 2018

Acknowledged.

Best solution would be to just exit the function if currentWeaponMode returns a number.
https://github.com/DerZade/grad_minui/blob/master/addons/grad_minui_weaponinfo/functions/fn_showWeaponInfo.sqf#L32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants