Skip to content

Conversation

@Pauwelz
Copy link
Contributor

@Pauwelz Pauwelz commented Nov 4, 2025

Because of discrepancy between the documentation and the signature of TAntiban.AddBreak, certain issues popped up when either updating breaks in the form or reading them from the file with the interval and length being swapped.

As evidenced by running the examples\antiban_form.simba twice, once with defaults, once after loading presets:
{INTERVAL = 1800000, LENGTH = 120000, LOGOUTCHANCE = 0.01, STDVAR = 0.33, NEXT = 2153742.42903776, PREVIOUS = 0} {INTERVAL = 120000, LENGTH = 1800000, LOGOUTCHANCE = 0.01, STDVAR = 0.33, NEXT = 121432.544598551, PREVIOUS = 0}

By switching the parameters in TAntiban.AddBreak so it's in line with the documentation, this is resolved.
The json values used in TAntibanFormHelper.LoadBreaks also refer to the names instead of indexes now, so it's easier to indentify which value is being passed. This brings it in line with TAntibanFormHelper.LoadSleep.

Switched from integers to named keys when loading breaks from antiban json.
Switch parameters in TAntiban.AddBreak signature to be in line with the documentation and aligned with usage in antibanform.simba
@Torwent
Copy link
Collaborator

Torwent commented Nov 4, 2025

I was gonna say it was best to just update the docs so antiban form didn't need to get updated but I do like that you changed it to use the key names which makes it easier to spot future errors. Thanks!

@Torwent Torwent merged commit 51d66c6 into WaspScripts:main Nov 4, 2025
1 check passed
@Pauwelz Pauwelz deleted the fix/antiban-breaks branch November 4, 2025 23:02
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

Successfully merging this pull request may close these issues.

2 participants