I have a problem with the event "execute command", help me please !

Started by LeMoineP3sheur on Thu, 10/29/2015 - 21:15
Last seen on 12:59, 11. Aug 2016
Joined Jun 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I have a problem with the event "execute command", help me please !
Thu, 10/29/2015 - 21:15

I created an item and I would like that he executes this command when we make a right click in air : /execute @e[r=20,rm=5] ~ ~ ~ fill ~1 ~10 ~1 ~-1 ~ ~-1 ice 0 replace air but that doesn't work and the creation of the object fails :

:clean
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava

C:\Pylo\MCreator160\forge\build\sources\java\mod\mcreator\mcreator_icesword.java:124: error: cannot find symbol
int j = (int)(entity.prevPosY + (entity.posY - entity.prevPosY) * (double)var4 + 1.62D - (double)entity.yOffset);
                                                                                                       ^
  symbol:   variable yOffset
  location: variable entity of type EntityPlayer
1 error
:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 44.061 secs
C:\Pylo\MCreator160\forge>
Task completed with return code 0 in 48426 milliseconds


I would like to know why, thank you.

PS : I'm french and I have a bad english, sorry ;)

 

Last seen on 00:45, 2. Mar 2018
Joined Jul 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Ok, I see your problem. Three
Thu, 10/29/2015 - 22:09

Ok, I see your problem. Three things.

1. Type the command without the /. For example, instead of putting /tp you'd put tp.

2. It's /kill, not /execute. If you do this command with @e though and a minimum radius of 5 and maximum of 20, it'd kill EVERYTHING (including players) within that radius. Just so you know. If you don't want that, look up the usage of /kill. It'll tell you how to specify what type of creature you want it to kill all of.

3. You can only have one command. in there. Use a stacked event, then do the /kill command for one and the /fill one in the other part of the stacked event. One at a time.

Last seen on 12:59, 11. Aug 2016
Joined Jun 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Ok, thank you ^-^ !
Thu, 10/29/2015 - 22:30

Ok, thank you ^-^ !

Last seen on 00:45, 2. Mar 2018
Joined Jul 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:Ok, thank you ^-^ !
Fri, 10/30/2015 - 01:59

@#2 Let me know if it works. :)