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

Workaround for settings size limitation #959

Merged
merged 3 commits into from
Aug 19, 2018

Conversation

jokoho48
Copy link
Member

@jokoho48 jokoho48 commented Aug 8, 2018

this PR is a workaround that fixes an issue that settings could only be 8kb long due to the use of format.

example: https://gist.github.com/neilzar/cdf4fa7a06d43560df64eea36c2cffb5
parse throws the error

Error Generic error in expression
Error position: <parseSimpleArray format ["[%1]", _string>
File x\cba\addons\settings\fnc_parse.sqf, line 30

@dedmen
Copy link
Contributor

dedmen commented Aug 8, 2018

how about
["[", _string, "]"] joinString ""
?
Should be faster.
Also 8kb? :D Where did you get that many settings?

@jonpas
Copy link
Member

jonpas commented Aug 8, 2018

Also 8kb?

Exactly what he linked I assume.

@dedmen
Copy link
Contributor

dedmen commented Aug 8, 2018

Exactly what he linked I assume.

🤦‍♂️ Too hot outside.

@jokoho48
Copy link
Member Author

jokoho48 commented Aug 8, 2018

Also 8kb? :D Where did you get that many settings?

allow sound mods and other small client side mods and you have so much in ace_common_checkPBOsWhitelist.

and good idea with joinString. will do

@@ -27,7 +27,7 @@ private _fnc_parseAny = {
_string = _string splitString WHITESPACE joinString "";
};

parseSimpleArray format ["[%1]", _string] select 0
parseSimpleArray (["[", _string, "]"] joinString "") select 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left out the semi colon to indicate the scope's return value.

@jonpas jonpas changed the title Workaround for settings size limitation. Workaround for settings size limitation Aug 8, 2018
@commy2 commy2 added this to the 3.8.1 milestone Aug 8, 2018
@Killswitch00 Killswitch00 merged commit ef9facb into master Aug 19, 2018
@commy2 commy2 deleted the fixSettingsSizeLimitation branch August 19, 2018 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants