#Execute function not running

1 messages · Page 1 of 1 (latest)

frank sparrowBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

feral marlin
#

Syringe:

checkforclick.mcfunction
execute as @a[nbt=!{SelectedItem:{id:"minecraft:carrot_on_a_stick", tag:{CustomModelData:98,display:{Name:'[{"text":"Injection of Vitality","italic":false,"color":"yellow"}]'}}}},scores={syringe_cooldown=1..}] run function magicitems:syringe/nohold

nohold.mcfunction

scoreboard objectives setdisplay sidebar
effect clear @s slowness 
stopsound syringe.syringes.music
tellraw @s {"text": "Action Cancelled", "bold":true, "italic":true, "color":"red"}```

Syringe_instanthealth:

**checkforclick.mcfunction:**
```execute as @a[nbt=!{SelectedItem:{id:"minecraft:carrot_on_a_stick", tag:{CustomModelData:99,display:{Name:'[{"text":"Revitalizing Injection","italic":false,"color":"red"}]'}}}},scores={syringe_health_cooldown=1..}] run function magicitems:syringe_instanthealth/nohold```

**nohold.mcfunction:**
```scoreboard players set @s syringe_health_cooldown 0
scoreboard objectives setdisplay sidebar
effect clear @s slowness 
stopsound syringe.syringes.music
tellraw @s {"text": "Action Cancelled", "bold":true, "italic":true, "color":"red"}```
#

Tick and Load.mcfunction's

load.mcfunction:

scoreboard objectives add syringe used:carrot_on_a_stick
scoreboard objectives add syringe_cooldown dummy
#Syringe Instant Health
scoreboard objectives add syringe_health used:carrot_on_a_stick
scoreboard objectives add syringe_health_cooldown dummy```

**tick.mcfunction:**
```#Syringe 
scoreboard players remove @a[scores={syringe_cooldown=1..}] syringe_cooldown 1
function magicitems:syringe/checkforclick
scoreboard players reset @a syringe
execute as @a[scores={syringe_cooldown=1}] run function magicitems:syringe/usesyringe

#Syringe Instant Health
scoreboard players remove @a[scores={syringe_health_cooldown=1..}] syringe_health_cooldown 1
function magicitems:syringe_instanthealth/checkforclick
scoreboard players reset @a syringe_health
execute as @a[scores={syringe_health_cooldown=1}] run function magicitems:syringe_instanthealth/usesyringe```
ebon surge
#

Do the logs say anything?

lost narwhalBOT
#
:information_source: Default Launcher Logs

The logs are where Minecraft displays errors when something goes wrong and can thus help you gain information about why something isn't working for you!
To open the logs:

  1. Enable logs in the Minecraft Launcher
  2. Start your game (or restart it if you already have an open instance)
  3. Enjoy spotting errors getting much easier!
feral marlin
#

Failed to load function magicitems:syringe/nohold
java.util.concurrent.CompletionException: java.lang.IllegalArgumentException: Whilst parsing command on line 4: Invalid name or UUID at position 10: stopsound <--[HERE]
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.IllegalArgumentException: Whilst parsing command on line 4: Invalid name or UUID at position 10: stopsound <--[HERE]
at hb.a(SourceFile:76)
at aht.a(SourceFile:83)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)

#

its a lot

#

btw

#

the sound its valid bcs and it works

#

its a custom sound I used

#

I figured out it was the stopsound thing