#JS Error with .runCommand('execute') idek why

1 messages · Page 1 of 1 (latest)

novel current
#

[Scripting][error]-Unhandled promise rejection: CommandError: Syntax error: Unexpected "@s": at "xecute as >>@s<< at @e[typ"

player.runCommandAsync(`execute as @s at ${claimbot} run tickingarea add ~50 -64 ~50 ~-50 -64 ~-50 unclaiming`)
function removeClaim() {
    for (const player of world.getPlayers()) {
      const claimbot = '@e[type=armor_stand,name=claim,x=~,y=300,z=~,c=1,r=70]'
      player.runCommand(`scoreboard players operation @s claime = ${claimbot} claime `)
      const claimID = getScore('claim', player)
      const claimIDbot = getScore('claime', player)
      setScore('claime', player, 0)
      const perms = getScore('perms', player);
      if (claimID == claimIDbot) {
        if (perms == -1) {
          player.sendMessage('§2You successfully removed your §afaction claim§2.')
          player.runCommandAsync(`execute as @s at ${claimbot} run tickingarea add ~50 -64 ~50 ~-50 -64 ~-50 unclaiming`) //error
          player.runCommandAsync(`execute as @s at ${claimbot} run fill ~50 -64 ~50 ~-50 -64 ~-50 bedrock`) //same error
          player.runCommandAsync(`kill ${claimbot}`)
          player.runCommandAsync('tickingarea remove unclaiming')
          player.removeTag('hasclaim')
          setScore('hasclaim', player, 0)
        }else{
          player.sendMessage('§cYou aren\'t in your §4faction claim§c.')
        }
      }else{
        player.sendMessage('§cThis isnt your §4faction claim§c.')
      }
    }
}```
 full code
#

my guess is "for (const player of world.getPlayers())" does not let me do the execute

#

but theres no way cause in other parts it works just fine

desert needle
novel current
#

still doesnt work without it

#

i tried everything

#

also execute at ${claimbot} run

#

execute positioned ${player..loc.x} ${player..loc.y} ${player.loc.z}

#

still nothing

#

or like execute as @s at @s run execute at @e[...]

gritty iris
#

show your @desert needle manifest

#

woop,

#

@novel current

#

show manifest

novel current
#

I just logged off my pc lemme get back on

gritty iris
#

change the min version to 1.20

novel current
#

Idk if it worked it just threw some other errors I gotta log off tho

#

Il check back tomorrow