problem with functions

Started by errorerererrrrr on

Topic category: Help with modding (Bedrock Edition)

Last seen on 11:59, 31. May 2023
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
problem with functions
Thu, 02/16/2023 - 03:21 (edited)

there is a little bit of an error i dont know how to fix. im making an addon that allows you to use a function to give you some admin tools, it works fine, but the issue is that in the runscript function which you put in an always active repeating command block wont work. the commands used are listed below.

execute as @a [hasitem={item=useful_tools:grabtool,location=slot.weapon.mainhand,slot=0}] at @s run tp @e [tag=!tools,r=6] ^^1^4
execute as @a [hasitem={item=useful_tools:freezetool,location=slot.weapon.mainhand,slot=0}] at @s run tag @e [tag=!tools,r=6] add frozen
tp @e [tag=frozen] @e [c=1,tag=frozen]
effect @e [tag=frozen] slowness 1 255 true
execute as @a [hasitem={item=useful_tools:unfreezetool,location=slot.weapon.mainhand,slot=0}] at @s run tag @e [tag=!tools,r=6] remove frozen
execute as @a [hasitem={item=useful_tools:invistool,location=slot.weapon.mainhand,slot=0}] at @s run effect @s invisibility 1 1 true

 

i even tried putting the part where it uses a secondary command in 

{
these.
}

 but it wont work either. any help is appreciated(no like seriously i dont know what to do)(help me) :)

Edited by errorerererrrrr on Thu, 02/16/2023 - 03:21
Last seen on 01:24, 18. May 2023
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It is not possible to use @s…
Mon, 04/24/2023 - 23:31

It is not possible to use @s if it's put in a command block, hope this helps!

Last seen on 11:59, 31. May 2023
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks
Fri, 04/28/2023 - 02:21

Thanks