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

[CBA_help] script error on headless clients #467

Closed
Dorbedo opened this issue Aug 16, 2016 · 4 comments
Closed

[CBA_help] script error on headless clients #467

Dorbedo opened this issue Aug 16, 2016 · 4 comments
Assignees
Labels
Milestone

Comments

@Dorbedo
Copy link
Contributor

Dorbedo commented Aug 16, 2016

Arma 3 Version: 1.62 (stable)
CBA Version: 3.0.0 (stable)

Mods:

  • @CBA_A3
  • ....

Description:
Error Undefined variable in expression: cba_keybinding_activemods File x\cba\addons\help\XEH_postClientInit.sqf, line 70

Script error since headlessClient don't get the variable initialized
See: https://github.com/CBATeam/CBA_A3/blob/master/addons/keybinding/XEH_preInit.sqf#L4
the whole help component shouldn't be executed on the headless clients.

Steps to reproduce:

  • Setup a server
  • load a mission with headless Clients
  • let a headless connect
  • take a look at the log

Where did the issue occur?

  • Headless Client

RPT log file:

@commy2
Copy link
Contributor

commy2 commented Aug 16, 2016

Problem is not that the variable is not initialized on headless clients, but that CBA_fnc_fnc_addKeybind has been called there.

This line has to be changed to make CBA_fnc_fnc_addKeybind safe:

if (isDedicated) exitWith {};

If it's your mod then maybe you can for now restrict CBA_fnc_fnc_addKeybind to only be executed where hasInterface is true?

@commy2 commy2 self-assigned this Aug 16, 2016
@commy2 commy2 added the Bug label Aug 16, 2016
@commy2 commy2 added this to the 3.0.1 milestone Aug 16, 2016
@Dorbedo
Copy link
Contributor Author

Dorbedo commented Aug 16, 2016

It's not my mod/Mission where addkeybind is called on an headless client.
I'll try to spot the causing mod.

Nevertheless your push should fix the Issue anyway. Thx.

@commy2
Copy link
Contributor

commy2 commented Aug 16, 2016

Yup. Issue will be fixed. I just thought that this could help solving the problem without having to wait for a CBA update.

@Dorbedo
Copy link
Contributor Author

Dorbedo commented Aug 16, 2016

Since it's nothing critical, just a single script error - I can live with that until the next CBA release ;-)

Killswitch00 added a commit that referenced this issue Aug 17, 2016
Quit 'CBA_fnc_addKeybind' on headless clients, fix #467
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants