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

Function ALiVE_fnc_HashGet causes an Undefined variable error in function ALiVE_fnc_ProfileNameSpaceLoad #791

Open
4 of 6 tasks
scameronde opened this issue Sep 28, 2022 · 1 comment

Comments

@scameronde
Copy link

Prerequisites

  • Can you reproduce the problem using ALiVE and CBA Only?
  • Are you running the latest version of ALiVE ?
  • Are you running the latest version of CBA_A3?
  • Have you attached an unbinarized SQM?
  • Have you attached your RPT (If the issue relates to data, also attach Server RPT and ALiVE Plugin Log)?
  • Have you attached screenshots of the Parameters set on the offending Module?

Description

In certain conditions, the function ALiVE_fnc_ProfileNameSpaceLoad throws an error and returns an isNil value.

Steps to Reproduce

  1. start a new scenario with local data persistence (so basically isNil (profileNamespace getVariable _mission))
  2. call "my_var" call ALiVE_fnc_ProfileNameSpaceLoad -> returns false
  3. server save scenario
  4. call "my_var" call ALiVE_fnc_ProfileNameSpaceLoad -> ALiVE_fnc_HashGet throws an error
  5. call ["my_var", true] call ALiVE_fnc_ProfileNameSpaceSave then call "my_var" call ALiVE_fnc_ProfileNameSpaceLoad -> returns true

Expected behavior: [What you expected to happen]

Step 4 should not throw an error. It might be OK to return false like in step 2 (the case with no initialized profile data)

Actual behavior: [What actually happened]

Step 4 throws an error and the function ALiVE_fnc_ProfileNameSpaceLoad, which it should not.

@scameronde
Copy link
Author

Can not attach rpt.
Here are the log lines showing the error:

11:44:39 [CBA] (xeh) INFO: [378000,6632.26,0] PostInit started. MISSIONINIT: missionName=ALiVE-Operation-Landlord-V2, missionVersion=54, worldName=Altis, isMultiplayer=true, isServer=true, isDedicated=false, CBA_isHeadlessClient=false, hasInterface=true, didJIP=false
11:44:39 [CBA] (versioning) INFO: [378000,6632.28,0] VERSIONING:alive_main=1.17.0.2209061, cba=3.15.8.220912, zen=1.12.2.30, cfp=0.6.8.19101500
11:44:39 [CBA] (xeh) INFO: [378000,6632.46,0] PostInit finished.
11:44:40 ALiVE 0 : 6633.19 - ALiVE_sys_acemenu: ACE interact_menu not active or no interface found, exiting
11:44:40 ALiVE 0 : 6633.32 - Registered controls for NON-JIP on briefing screen: B Alpha 1-2:1 (scameronde)
11:44:40 ALiVE 0 : 6633.32 - Registered SITREP controls for NON-JIP on briefing screen: B Alpha 1-2:1 (scameronde)
11:44:40 ALiVE 0 : 6633.32 - Registered PATROLREP controls for NON-JIP on briefing screen: B Alpha 1-2:1 (scameronde)
11:44:40 Error in expression < {[_data,_id] call ALiVE_fnc_HashGet};

_result>
11:44:40   Error position: <_result>
11:44:40   Error Undefined variable in expression: _result
11:44:40 File x\alive\addons\x_lib\functions\data\fnc_ProfileNameSpaceLoad.sqf..., line 38

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

1 participant