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

(custom condition) continue can't be use in a loop #147

Open
Anarchick opened this issue Oct 21, 2019 · 4 comments
Open

(custom condition) continue can't be use in a loop #147

Anarchick opened this issue Oct 21, 2019 · 4 comments

Comments

@Anarchick
Copy link

Anarchick commented Oct 21, 2019

2.0.0 SNAPSHOT , skript2.4Beta9

Work, return true

condition test:
    check:
        loop 2 times:
            exit loop
        continue

Does not work on any type of loop, return always false

condition test:
    check:
        loop 2 times:
            continue
@Matocolotoe
Copy link
Contributor

that's because "continue" means "go to the next value" when used inside a loop

@Anarchick
Copy link
Author

You right, forgoten that skript effect ...
So it might be interesting to change the pattern of "continue" to prevent this mistake.

And why use continue/negate the condition and not return %boolean% ? Custom expression #get allow to use return %object%

@Matocolotoe
Copy link
Contributor

yeah that's a bit strange

@Anarchick
Copy link
Author

And you don't have to remove the continue/negate, you can keep it (no broke existing codes) , just implement the return ;)

TPGamesNL added a commit to SkriptLang/skript-reflect that referenced this issue Dec 8, 2021
… (except for delayed effects) (btk5h/skript-mirror#147)

Update some error messages
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

No branches or pull requests

2 participants