-
Notifications
You must be signed in to change notification settings - Fork 737
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
fix Issue with forEach Loops and deleteAt Index #2848
Conversation
First SQF Validator fix!? :D |
what ou mean? you mean that we must integrate this in the SQF Validator? |
No, only that it found an error, which is good. :) |
aha ok yeah i miss click befor and delete a bracket :D |
Previously when iterating over an array and modifying the same array via deletion of the current index, incorrect means was used to account for the change in index resulting in any further deletions being applied to the wrong elements. This solution does not require duplication of the array or the use of external variables to track the number of deleted elements. We simply lower the `_forEachIndex` by 1 whenever an element is removed.
|
@SilentSpike your code dont work sorry |
😢 Should I obliterate it from the branch history or do you want to revert it in a new commit? |
sorry i dont have much time currently feel free to do :D |
# Conflicts: # addons/common/XEH_postInit.sqf
I believe this issue is also present in |
yeah posible |
That file could use a bit of a minor re-write just to make it more readable anyway. Might be best to handle it in another PR |
Is this done? |
I suggest we merge this and handle the huntIR issue elsewhere |
fix Issue with forEach Loops and deleteAt Index
No description provided.