WingedSeal / jmc

A compiler for JMC (JavaScript-like Minecraft Function), a mcfunction extension language for making Minecraft Datapack
https://jmc.wingedseal.com
MIT License
64 stars 8 forks source link

Timer.set() using a scoreboard value creates an invalid command #42

Closed w00tyd00d closed 10 months ago

w00tyd00d commented 11 months ago

Describe the bug

When using Timer.set() to set a value for a timer scoreboard, if you use a scoreboard value as the timer value it will properly swap the command with a scoreboard player operation command, but will not parse the keywords properly for the command to work.

When calling the function Timer.set(Timers, test_player, test_objective:value);, instead of producing a result like this:

scoreboard players operation test_player Timers = value test_objective

it will instead insert it as:

scoreboard players operation test_player Timers = test_objective:value

To Reproduce

  1. Set a Timer scoreboard using the Timer.add() function
  2. Set a value to the Timer scoreboard using a scoreboard value as the length

Desktop