Carpet

Carpet

2M Downloads

Can't run custom scarpet commands in datapacks

Desynq opened this issue ยท 2 comments

commented

I'm trying to use the playerme.sc script from the list of downloadable carpet scripts to remotely control fake players without needing to declare their name within the datapack.

Currently, I'm trying to make a fake player named "Steve" eat continuously using execute as Steve at @s run playerme use continuously. The datapack, however, fails to the load the function containing the custom command upon doing /reload.

I'm currently using version 1.4.43+v210706 of the carpet mod.
Used carpet script source code link

commented
  1. Can you please update to Carpet mod version 1.4.53?
  2. You may need to enclose the command in a script run run('...') where ... is the original command line.
    In other words, replace the following command: execute as Steve at @s run playerme use continuously
    With: execute as Steve at @s run script run run('playerme use continuously')
    Or: script run run('execute as Steve at @s run playerme use continuously')

This may be caused by the following flow, which occurs when doing /reload:

  1. Unload Scarpet apps.
  2. Reload data packs (including functions).
  3. Reload Scarpet apps.
commented

Your suggestion worked, thanks.