Page MenuHomeFeedback Tracker

BIS_fnc_getParamValue does not work on dedicated server from within object/module init fields
Closed, ResolvedPublic

Description

I'm using a mission parameter to conditionally hide/show a module. Starting in the 1.44 update any call to BIS_fnc_getParamValue returns 0 when called from an init field on an object or module placed via the editor. However, if you call the BIS_fnc_getParamValue function within init.sqf, a value is returned as expected (non-zero)

Details

Legacy ID
1920794296
Severity
None
Resolution
Duplicate
Reproducibility
Always
Category
Scripting
Steps To Reproduce

Place a module via the editor. Within one of it's init fields, log the value returned from BIS_fnc_getParamValue for a parameter whose default value != 0. It should log a value of 0. Then, log the value when called from the init.sqf script - it should return a non-zero value.

FYI, this only seems to happen when connected to a dedicated server - it doesn't happen when running preview via the mp editor.

Event Timeline

duda edited Steps To Reproduce. (Show Details)May 20 2015, 3:08 PM
duda set Category to Scripting.
duda set Reproducibility to Always.
duda set Severity to None.
duda set Resolution to Duplicate.
duda set Legacy ID to 1920794296.May 8 2016, 12:07 PM
duda added a subscriber: duda.
duda added a comment.May 21 2015, 4:55 AM

Updated - I'm pretty sure this problem started once the 1.44 update came out.

duda added a comment.May 21 2015, 5:12 AM

Noticed there was a change to this function in 1.44 according to release notes. Looks like someone ran into the same problem and worked around it by defaulting the paramsArray to [] if paramsArray isn't defined. What would cause paramsArray not to be defined at module initialization time (on the client's side, connected to a dedicated server)?