skript-mirror icon indicating copy to clipboard operation
skript-mirror copied to clipboard

Local variables don't work in custom syntax

Open OfficialDonut opened this issue 6 years ago • 3 comments

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

  1. Set local variable in parse section
  2. 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

OfficialDonut avatar Dec 29 '18 18:12 OfficialDonut

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

  1. Set local variable in parse section
  2. 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 .

btk5h avatar Dec 29 '18 19:12 btk5h

works in 36

OfficialDonut avatar Dec 29 '18 19:12 OfficialDonut

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}%"```

Anarchick avatar Oct 21 '19 11:10 Anarchick