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

Set time in world variable #3971

Closed
Envqu opened this issue May 9, 2021 · 3 comments
Closed

Set time in world variable #3971

Envqu opened this issue May 9, 2021 · 3 comments
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@Envqu
Copy link

Envqu commented May 9, 2021

I cannot use variable in 'set time of the world "%{world}%" to 24:00'
I tried 'set time in world {world} to 24:00' but it also not working.

image

Skript version: 2.5.3
Server version: 1.16.5 Purpur

@ShaneBeee
Copy link
Contributor

This is not a bug.
The world expression expects a world literally, variables do not work here.
The world needs to be decided at parse time.

To use a world from a variable, you will need to use the world function world("name")

I don't know if this is intended behaviour and if its something we should change, so I will leave that open for team discussion.

@TPGamesNL
Copy link
Member

The literal shouldn't be used here, you can simply do set time of {world} to 24:00. Alternatively, you can use the world function, but in this scenario (where the world is already in a variable), there is no need for that.

I think this is merely a misunderstanding of the syntax, because the syntax does not contain world, except as a type.

@TPGamesNL
Copy link
Member

After talking to snow, we decided it'd be best to add an expression to convert a string to a world, with (almost) the same syntax as the literal

@TPGamesNL TPGamesNL added enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. and removed dev needed labels May 10, 2021
@TPGamesNL TPGamesNL added PR available Issues which have a yet-to-be merged PR resolving it 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 Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. 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

4 participants