RHS Feedback

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004712AFRF[All Projects] Generalpublic2018-10-28 03:002018-10-28 14:49
Reporterjaj22 
Assigned Toreyhard 
PrioritynoneSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version0.4.9 
Summary0004712: rhs_gripod.sqf assumes player always has primary weapon, can hang UI on opening arsenal
Descriptionrhs_gripod.sqf installs handlers on the InventoryClosed and arsenalOpened events which throw script errors on line 31 when the player has no primary weapon. In the case of the arsenalOpened event, the Arma 3 UI will hang entirely, requiring a forced restart.

I'm not sure what these event handlers are for other than removing themselves, but they should at least be checking whether the player has a primary weapon.

I haven't checked whether other scripts have a similar problem. rhs_gripod.sqf exists in both AFRF and USAF in rhs_c_weapons.pbo.
Steps To ReproduceTo get a (harmless?) script error:
1. Equip weapon with grip pod.
2. Drop it on the floor from inventory.
3. Close inventory.

To get a UI lock:
1. In Eden Editor, create mission with "survivor" player (from independent faction) and arsenal with grip pod weapon inside. Enable respawn on death position.
2. Start mission as multiplayer.
3. Open arsenal, equip your grip pod weapon. Close arsenal.
4. Manually respawn. You should respawn with no weapons.
5. Now attempt to open arsenal. It should hang the UI on the arsenal loading screen.
TagsNo tags attached.
Is it a wish/request?No
RHS version
Arma 3 version1.84
Did you used any other mod when the error occurred?No
Which mods?
Attached Files

- Relationships

-  Notes
(0008728)
reyhard (administrator)
2018-10-28 09:08

Can you post that error message here?
(0008733)
jaj22 (reporter)
2018-10-28 14:48

Sure, forgot to post that. From the RPT:

19:35:50 Error in expression <urrentMagazine _p;

_p addWeapon _t;
_p addMagazine [(primaryWeaponMagazine _p) >
19:35:50 Error position: <addMagazine [(primaryWeaponMagazine _p) >
19:35:50 Error Type Any, expected String
19:35:50 File \rhsafrf\addons\rhs_c_weapons\scripts\rhs_gripod.sqf [RHS_fnc_accGripod], line 31


I'm new to Arma scripting but it looks like primaryWeaponMagazine returns a zero-element array here, selecting the first element returns some sort of null (type Any?), and then addMagazine flakes out because the first parameter isn't a string.

It always seems to link RHSAFRF even if I'm using USAF weapons. That's probably not weird to anyone else.

- Issue History
Date Modified Username Field Change
2018-10-28 03:00 jaj22 New Issue
2018-10-28 09:08 reyhard Note Added: 0008728
2018-10-28 09:08 reyhard Assigned To => reyhard
2018-10-28 09:08 reyhard Status new => feedback
2018-10-28 14:48 jaj22 Note Added: 0008733
2018-10-28 14:48 jaj22 Status feedback => new
2018-10-28 14:49 reyhard Status new => resolved
2018-10-28 14:49 reyhard Fixed in Version => 0.4.9
2018-10-28 14:49 reyhard Resolution open => fixed


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker