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

Issues with inline comparison of functions #2261

Closed
Matocolotoe opened this issue Jul 19, 2019 · 1 comment
Closed

Issues with inline comparison of functions #2261

Matocolotoe opened this issue Jul 19, 2019 · 1 comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).

Comments

@Matocolotoe
Copy link
Contributor

Matocolotoe commented Jul 19, 2019

Description

When comparing 2 objects returned by functions without : an error appears

Steps to Reproduce

function a() :: boolean:
	return true

function b() :: boolean:
	return false

Does work :

a() = b():
a() is b():
a() != b():
a() is not b():

Does not :

a() = b()             # Invalid brackets/variables/text in ') = b('
a() != b()            # Invalid brackets/variables/text in ') != b('
a() is b()            # Invalid brackets/variables/text in ') is b('
a() is not b()        # Invalid brackets/variables/text in ') is not b('

Storing the results into variables and then comparing them does actually work, with or without :

Expected Behavior

The condition should pass.

Errors / Screenshots

The following error appears : Invalid brackets/variables/text in ... (more info in the piece of code)

Server Information

  • Server version/platform: 2.4-alpha4
  • Skript version: Spigot 1.14.3
@Blueyescat
Copy link
Contributor

Blueyescat commented Jul 19, 2019

I tried, that error happens when you use "inline conditions", not normal conditions (with :)
and doesn't happen if one of the expressions is not a function

@Whimsyturtle Whimsyturtle added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). labels Jul 10, 2020
@Whimsyturtle Whimsyturtle changed the title Comparison issues with functions Issues with inline comparison of functions Jul 10, 2020
@TPGamesNL TPGamesNL added the PR available Issues which have a yet-to-be merged PR resolving it label Mar 27, 2021
@FranKusmiruk FranKusmiruk added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels May 9, 2021
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. completed The issue has been fully resolved and the change will be in the next Skript update. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
Projects
None yet
Development

No branches or pull requests

6 participants