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

loop-number/integer not an actual Skript integer #2326

Closed
Matocolotoe opened this issue Aug 2, 2019 · 5 comments
Closed

loop-number/integer not an actual Skript integer #2326

Matocolotoe opened this issue Aug 2, 2019 · 5 comments
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: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@Matocolotoe
Copy link
Contributor

Description

The expressions loop-number and loop-integer (as well as loop-value if the value is an integer) are not usable as integers in function parameters

Steps to Reproduce

function test(i: integer):
	# Some code

command /test:
	trigger:
		loop 10 times:
			test(loop-integer)
			test(loop-number)
			test(loop-value)

Expected Behavior

No error should appear

Errors / Screenshots

The 1st argument given to the function 'test' is not of the required type integer. Check the correct order of the arguments and put lists into parentheses if appropriate (e.g. 'give(player, (iron ore and gold ore))'). Please note that storing the value in a variable and then using that variable as parameter will suppress this error, but it still won't work. (test.sk, line 8: test(loop-number)')

Server Information

  • Server version/platform: Spigot 1.14.4
  • Skript version: 2.4-beta4

Additional Context

Skript's "integers" being longs, loop-number is an actual integer and thus is not of type long. Also, this error didn't occur in 2.2.

@Vrganj
Copy link
Contributor

Vrganj commented Aug 2, 2019

You shouldn't use integers in skript

@Matocolotoe
Copy link
Contributor Author

Also, this error didn't occur in 2.2.

@Vrganj
Copy link
Contributor

Vrganj commented Aug 2, 2019

It doesn't matter if it occured before. You shouldn't use integers

@Matocolotoe
Copy link
Contributor Author

This is still a valid issue.

@FranKusmiruk
Copy link
Member

It doesn't matter if it occured before. You shouldn't use integers

Doesn't change the fact that this error shouldn't appear when the input is expected to be an integer.

Also, try to be a bit more polite in the issue tracker, there's no need to say it like this.

@Wealthyturtle Wealthyturtle added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. labels Oct 10, 2019
@TPGamesNL TPGamesNL added the PR available Issues which have a yet-to-be merged PR resolving it label Jun 21, 2021
@TPGamesNL TPGamesNL 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 Aug 14, 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: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

6 participants