Variable bug and cant modify my pickaxe

Published by Zhuxy on Mon, 04/16/2018 - 00:28
Status
Fixed
Type
Product/platform
MCreator/Windows
Priority
Normal
Issue description

I just wanted to say sorry for my bad English, I speak French.

I can't compile my mod or test it because of a error that I have to correct. I know how to correct it, but the problem is that it doesn't save. The first error is the pickaxe error. When I edit the event, I forgot to put the 1 after the +. So I went into the code section and added it. I clicked save and it regive me the error and the 1 is not there anymore. The second one is the variable. I wanted to delete some of them but the remove variable doesn't work. After,  I accidently create a variable that has no name that is equal to 1. So I cant build because of that. Like I said, I cant remove it  and even if I remove it from the code itself, it reappear. I tried everything. Here is the error message, thank you:

 

C:\Pylo\MCreator178\forge\build\sources\main\java\mod\mcreator\mcreator_emeraldPickaxe.java:85: error: illegal start of expression
world.getBlockState(new BlockPos(i+1, j+, k)).getBlock().dropBlockAsItem(world, new BlockPos(i, j, k), world.getBlockState(new BlockPos(i+1, j+, k)), 1);
                                        ^
C:\Pylo\MCreator178\forge\build\sources\main\java\mod\mcreator\mcreator_emeraldPickaxe.java:85: error: illegal start of expression
world.getBlockState(new BlockPos(i+1, j+, k)).getBlock().dropBlockAsItem(world, new BlockPos(i, j, k), world.getBlockState(new BlockPos(i+1, j+, k)), 1);
                                                                                                                                               ^
C:\Pylo\MCreator178\forge\build\sources\main\java\mod\mcreator\mcreator_emeraldPickaxe.java:86: error: illegal start of expression
world.setBlockToAir(new BlockPos(i+1, j+, k));
                                        ^
C:\Pylo\MCreator178\forge\build\sources\main\java\mod\mcreator\mcreator_VarListtestenvironmentmod.java:11: error: <identifier> expected
public static int  = 1;
                 ^
4 errors

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.

Attachment Size
Capture.PNG32.04 KB 32.04 KB

Issue comments

For the event, you should remove it from the event editor and create it again. Regarding the empty name variable, go to the user folder, open workspace.mcreator and try to manually remove variable without the name.

Next version of MCreator will prevent such mistakes, fix variable delete bug and improve event system, so stay tuned for this release.

Thanks for the reply. I'm gonna try the fix for the variable. But for the event, I cant remove an event or modify it (When im in the object and not in the code) without removing every other event. I put like 20 events. It took me so much time. I'm not motivated to start again if it is the only solution.



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.