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

Basic Function return <none> #4216

Closed
1 task done
LowScarlet opened this issue Jul 23, 2021 · 12 comments
Closed
1 task done

Basic Function return <none> #4216

LowScarlet opened this issue Jul 23, 2021 · 12 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

@LowScarlet
Copy link

LowScarlet commented Jul 23, 2021

Skript/Server Version

[14:44:42 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[14:44:42 INFO]: [Skript] Skript's documentation can be found here: https://skriptlang.github.io/Skript
[14:44:42 INFO]: [Skript] Server Version: git-Purpur-1261 (MC: 1.17.1)
[14:44:42 INFO]: [Skript] Skript Version: 2.6-beta2
[14:44:42 INFO]: [Skript] Installed Skript Addons:
[14:44:42 INFO]: [Skript]  - skript-gui v1.3-alpha1 (https://github.com/APickledWalrus/skript-gui)
[14:44:42 INFO]: [Skript]  - Skellett v1.9.11 (https://forums.skunity.com/resources/skellett.24/)
[14:44:42 INFO]: [Skript]  - skript-yaml v1.4
[14:44:42 INFO]: [Skript]  - HolographicDisplaysAddon v1.0.0b
[14:44:42 INFO]: [Skript]  - skRayFall v1.9.26 (https://sk.rayfall.net/)
[14:44:42 INFO]: [Skript]  - SkBee v1.11.2 (https://github.com/ShaneBeee/SkBee)
[14:44:42 INFO]: [Skript]  - skript-placeholders v1.5.1 (https://github.com/APickledWalrus/skript-placeholders)
[14:44:42 INFO]: [Skript]  - AdvancementsAddon v1.0.0
[14:44:42 INFO]: [Skript]  - DiSky v2.2 (https://disky.itsthesky.info/)
[14:44:42 INFO]: [Skript]  - skDragon v0.17
[14:44:42 INFO]: [Skript]  - skUtilities v0.9.2 (https://tim740.github.io/)
[14:44:42 INFO]: [Skript]  - skript-reflect v2.2.2-dev (https://github.com/TPGamesNL/skript-reflect)
[14:44:42 INFO]: [Skript]  - Reqn v1.2.4
[14:44:42 INFO]: [Skript]  - SkQuery v4.1.5
[14:44:42 INFO]: [Skript]  - Skript-Paper v1.3.0 (https://github.com/ShaneBeee/Skript-Paper)

Bug Description

Basic Function from location(x, ,y, z) retrurn none

Expected Behavior

return location

Steps to Reproduce

set {_a} to location(1,100,1)
broadcast "%{_a}%"

Errors or Screenshots

Non error

Other

No response

Agreement

  • I have read the guidelines above and confirm I am following them with this report.
@AyhamAl-Ali
Copy link
Member

AyhamAl-Ali commented Jul 23, 2021

Location function requires a forth argument of world check this

@LowScarlet
Copy link
Author

Location function requires a forth argument of world check this

.. it should run even without it

@LowScarlet

This comment has been minimized.

@AyhamAl-Ali
Copy link
Member

AyhamAl-Ali commented Jul 23, 2021

It is required unless you're using some event that has event-world.

Please don't give stupid responses if you don't know

Respect yourself so others respect you.

@LowScarlet
Copy link
Author

LowScarlet commented Jul 23, 2021

It is required unless you're using some event that has event-world.

Please don't give stupid responses if you don't know

Respect yourself so others respect you.

it will give default world location which is world if not set, and previously it was running fine in 2.5, and i have done test by input world value and still return result is <none>

@LowScarlet

This comment has been minimized.

@AyhamAl-Ali
Copy link
Member

You need to learn how to speak to others with respect first.

This is the default behavior of location function, if I said something that you've tested you can simply say I have tested that and it didn't work OR provide your full code so others can help you.. no one can know what you've done if you don't say it! so next time make sure to say loud what you've done/tested and make sure to remove all your addons before reporting anything.

Adding to that, I wasn't arguing, I was simply helping you but it turned out that you don't deserve it.

@APickledWalrus
Copy link
Member

APickledWalrus commented Jul 23, 2021

I don't think it is necessary to become heated in a GitHub issue. Focusing on the actual problem here, a world should not be required as locations do not necessarily have a world (in that world is nullable). I'm not entirely sure how this functioned before, but if a world is not given, we can just create a location without a world or just provide the default world.

@LowScarlet
Copy link
Author

that will settle this debate and create a [bug] label for these issues,

@TheLimeGlass
Copy link
Collaborator

TheLimeGlass commented Jul 24, 2021

There should be an error stating that there is no world event value. Since one did not appear this is classified as a bug. Maybe EventValueExpressions don't get init method called for default functions.

Can you please provide your complete code as to where this function was used in for testing. Was it a command?

@LowScarlet
Copy link
Author

There should be an error stating that there is no world event value. Since one did not appear this is classified as a bug. Maybe EventValueExpressions don't get init method called for default functions.

Can you please provide your complete code as to where this function was used in for testing. Was it a command?

from function

@TPGamesNL
Copy link
Member

Caused by #3841.
The location function should not be a SimpleJavaFunction, as one of its values (the world parameter) may be null

@TPGamesNL TPGamesNL 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 Jul 30, 2021
@TPGamesNL TPGamesNL added the PR available Issues which have a yet-to-be merged PR resolving it label Jul 31, 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 30, 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

5 participants