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

Warn using date() #2345

Closed
Wealthyturtle opened this issue Aug 6, 2019 · 5 comments
Closed

Warn using date() #2345

Wealthyturtle opened this issue Aug 6, 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.

Comments

@Wealthyturtle
Copy link
Member

Description

When using the skript date() function, a warn for List is missing 'and' or 'or', defaulting to 'and' is thrown in the console

Steps to Reproduce

command /test:
    trigger:
        set {_d} to date(1970, 1, 1)
        broadcast "Date: %{_d}%"

Expected Behavior

For the data inside the date() function call to not be treated as a list

Errors / Screenshots

[Server thread/INFO]: [Skript] Reloading test.sk...
[Server thread/WARN]: List is missing 'and' or 'or', defaulting to 'and': 1970, 1, 1 (test.sk, line 3: set {_d} to date(1970, 1, 1)')
[Server thread/INFO]: [Skript] Successfully reloaded test.sk.
>test
[Server thread/INFO]: Date: 1/1/70 12:00 AM

Date works properly, just that it throws an un-necessary warn

Server Information

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

Additional Context

@HYPExMon5ter
Copy link
Contributor

Did you even read the warning? Just use date(1970, 1 and 1)

@Matocolotoe
Copy link
Contributor

The issue also happens when using any function (from Skript or Java with skript-mirror).
The problem is that function parameters were not behaving as a raw list of objects before...

@Wealthyturtle
Copy link
Member Author

@HYPExMon5ter
Copy link
Contributor

Yeah that needs to be updated, but, the code I sent should eliminate that warning while still having the same outcome, I haven’t tested it though

@bensku
Copy link
Member

bensku commented Aug 6, 2019

Using 'and' for function parameters is not intentional.

@bensku bensku added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Aug 6, 2019
@bensku bensku added the completed The issue has been fully resolved and the change will be in the next Skript update. label Aug 31, 2019
@bensku bensku closed this as completed Sep 3, 2019
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.
Projects
None yet
Development

No branches or pull requests

4 participants