Teleport effect breaks function's return
x8ight opened this issue ยท 2 comments
Skript/Server Version
Server Version: 1.21.1-122-4430e96 (MC: 1.21.1)
Skript Version: 2.9.3 (skriptlang-github)
Installed Skript Addons:
- skript-particle v1.3.1 (https://github.com/sovdeeth/skript-particle)
- skript-reflect v2.5.1 (https://github.com/SkriptLang/skript-reflect)
- SkBee v3.6.1 (https://github.com/ShaneBeee/SkBee)
Bug Description
Using the teleport effect in a function makes Skript think a return statement cannot be used.
Error: The return effect can only be used in functions, custom expressions, sections, custom syntax parse sections and conditions
Expected Behavior
Expected the teleport effect to teleport the entity, then the function to return the string.
Steps to Reproduce
Using the teleport effect inside of a function, followed by a return generates this issue. The following boiled-down code still yields the error, commenting out line 2 lets the script reload with no errors.
local function what() :: string:
teleport {_noOne} to {_nowhere}
return "Why?"
Errors or Screenshots
Other
Uninstalling skript-reflect changes the error message (2nd screenshot). However this function does not have a delay at all.
Agreement
- I have read the guidelines above and affirm I am following them with this report.
duplicate of #6444