skript-mirror icon indicating copy to clipboard operation
skript-mirror copied to clipboard

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

Open Anarchick opened this issue 6 years ago • 4 comments

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

Anarchick avatar Oct 21 '19 18:10 Anarchick

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

Matocolotoe avatar Oct 23 '19 09:10 Matocolotoe

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%

Anarchick avatar Oct 23 '19 12:10 Anarchick

yeah that's a bit strange

Matocolotoe avatar Oct 24 '19 20:10 Matocolotoe

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

Anarchick avatar Oct 25 '19 10:10 Anarchick