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

Fix conditionals with inline conditions or exit section effects #4175

Merged
merged 3 commits into from
Jul 10, 2021

Conversation

TPGamesNL
Copy link
Member

Description

Fixes a bug with code such as

command /test:
	trigger:
		if 1 = 1:
			broadcast "true"
			exit 1 section # or an inline condition that returns false, such as `1 = 2`
		else:
			broadcast "false"

broadcasting both true and false.


Target Minecraft Versions: any
Requirements: none
Related Issues: none

@TPGamesNL TPGamesNL added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jul 9, 2021
Copy link
Member

@APickledWalrus APickledWalrus left a comment

Choose a reason for hiding this comment

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

Looks good. Perhaps the SecConditional test could be expanded to cover this issue? Or a new test could be created?

@APickledWalrus APickledWalrus merged commit ef7f9a2 into SkriptLang:master Jul 10, 2021
@TPGamesNL TPGamesNL deleted the fix/conditional-overflow branch July 11, 2021 10:08
@iOshawott iOshawott mentioned this pull request Jul 29, 2021
1 task
Matocolotoe added a commit to Matocolotoe/Skript-1.8 that referenced this pull request Aug 26, 2021
harryirl added a commit to harryirl/Skript-1.8 that referenced this pull request May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants