skript-mirror
skript-mirror copied to clipboard
Local variables don't work in custom syntax
Describe the bug If you define a local variable in the parse section it's not set in the trigger/get/check section
To reproduce
- Set local variable in parse section
- Use the variable in the trigger/get/check section
Expected behavior The local variable should be set
Screenshots
effect test:
parse:
set {_test} to 1
continue
trigger:
broadcast "%{_test}%"
This will broadcast <none>
Server information
- skript-mirror: 0.19.1
- Skript: 2.3-beta6
- Bukkit: Spigot 1.13.2
- Minecraft: 1.13.2
- Java: 1.8.0_181
- OS: Windows
Does this work on earlier Skript versions? Skript may have changed how local variables function. On Sat, Dec 29, 2018 at 10:44 AM Donut [email protected] wrote:
Describe the bug If you define a local variable in the parse section it's not set in the trigger/get/check section
To reproduce
- Set local variable in parse section
- Use the variable in the trigger/get/check section
Expected behavior The local variable should be set
Screenshots
effect test: parse: set {_test} to 1 continue trigger: broadcast "%{_test}%"
This will broadcast
Server information
- skript-mirror: 0.19.1
- Skript: 2.3-beta6
- Bukkit: Spigot 1.13.2
- Minecraft: 1.13.2
- Java: 1.8.0_181
- OS: Windows
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/btk5h/skript-mirror/issues/111, or mute the thread https://github.com/notifications/unsubscribe-auth/AC82JA2hRlJ0h-bstl39Zuy3v_4-5i4eks5u97gfgaJpZM4ZkrB3 .
works in 36
can confirm that is not solve with skript-mirror 2.0.0 Snapshot and skript2.4Beta9 https://skript-mirror.gitbook.io/docs/v/2.x/advanced/custom-syntax/effects#section-parse
effect example:
parse:
set {_test} to 1
continue
trigger:
# {_test} always starts at 1 here
add 1 to {_test}
# 2 is always broadcast
broadcast "%{_test}%"```