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

Some CBA Settings fail to import #1620

Closed
tricona3 opened this issue Oct 19, 2023 · 5 comments
Closed

Some CBA Settings fail to import #1620

tricona3 opened this issue Oct 19, 2023 · 5 comments
Labels
Milestone

Comments

@tricona3
Copy link

Mods (complete and add to the following information):

  • Arma 3: 2.14
  • CBA: CBA_A3 v3.16.0.231017
  • Various other mods (ACE3, TFAR Beta, CUP Weapons/Units/Vehicles, multiple other mods including private ones.
    Make sure to reproduce the issue with only CBA on a newly created mission!

Description:
Some CBA settings now fail to import, giving the error in the RPT that they don't exist, despite them definitely existing. This wasn't a problem until this CBA update, and now it is doing it across various mods, including ones that haven't updated in years (so I'm ruling out them being the issue)

The issue is happening when either importing from a saved preset via the load button, or when pasting in the settings via the import button.

If I put the settings into a cba_settings.sqf file in the mission directory it does work however. But even if I then try to save that as a preset it then won't work when importing it to a fresh mission.

Steps to reproduce:

  • Make a new mission in Eden
  • Attempt to import CBA Settings from a saved preset
  • Does not import some settings, gives error in RPT that they don't exist

Expected behavior:
I would expect all settings to import as they did previously

Where did the issue occur?

  • Editor (Singleplayer)

Log Files:

Additional context:
It's really strange how it seems to be random settings that are doing this, some of these mods haven't updated in a long time so there's no reason they should have stopped working. As mentioned previously it was fine before the CBA update.

Screenshots:
example1
The screenshot just shows one of the example settings, just to prove that it definitely does exist. This is taken after attempting to import the settings, you can see it hasn't forced the setting despite that being in the preset.

@tricona3 tricona3 added the Bug label Oct 19, 2023
@johnb432
Copy link
Contributor

This reason why it's throwing the errors is because it considers the category comments as part of the first setting's name.
E.g. this is considered to be a setting name:

Setting // ACE Advanced Ballistics
force ace_advanced_ballistics_ammoTemperatureEnabled

The cba_settings.sqf file is preprocessed, which means all of the comments are deleted before it's processed. However, when importing, this does not happen and so the comments are part of the processing - something that is not intended.

A temporary fix is to remove the comments (e.g. // ACE Advanced Ballistics) from the file and then import the preset.

@tricona3
Copy link
Author

Ahh, I see. I wonder if this is due to the change in this update for parsing multiple lines?

Thanks for the temporary fix though. Will do that for the time being

@jonpas
Copy link
Member

jonpas commented Oct 19, 2023

I wonder if this is due to the change in this update for parsing multiple lines?
Likely yes.

@johnb432
Copy link
Contributor

johnb432 commented Oct 19, 2023

I wonder if this is due to the change in this update for parsing multiple lines?
Likely yes.

It's certain - I'm looking into solutions.

@jonpas
Copy link
Member

jonpas commented Oct 24, 2023

Fixed by #1622.

@jonpas jonpas closed this as completed Oct 24, 2023
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

3 participants