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

10 - 1 + 5 = 10 - 1 - 5 #1784

Closed
TrademarkTM opened this issue Dec 31, 2018 · 3 comments
Closed

10 - 1 + 5 = 10 - 1 - 5 #1784

TrademarkTM opened this issue Dec 31, 2018 · 3 comments

Comments

@TrademarkTM
Copy link

TrademarkTM commented Dec 31, 2018

Description

Skript returns the wrong result when using expressions like 10 - 1 - 5.
In that example, it returns 14 instead of the expected 4.

Likewise, 10 - 1 - 5 - 4 = 10 in Skript, where the expected result is 0.

The logic is correct when parentheses are assumed 10 - (1 - 5).

Server Information

  • Server version/platform: Spigot 1.12.2
  • Skript version: Skript 2.3 beta6
@TheBentoBox TheBentoBox added enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). labels Jan 2, 2019
@TheBentoBox
Copy link
Member

I'm putting this at lowest, partly because since math parsing can be tricky (though I'm sure there are many already solved solutions available) but more because it can easily be fixed with parentheses which also makes the code clearer anyway.

@bensku
Copy link
Member

bensku commented Jan 2, 2019

See #535 for more math issues.

@Wealthyturtle
Copy link
Member

Closing this in favor of #535

@Wealthyturtle Wealthyturtle removed enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). labels Oct 18, 2019
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

4 participants