[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