I have an error with code.

Started by TLORD765 on

Topic category: Help with MCreator software

Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have an error with code.
Sat, 04/02/2016 - 16:39 (edited)

Hi,

I made a new inventory, and I made it so that when you press a button, and bread is in an input slot, You would either get toast or burnt toast. I recompiled, and got this error:

This mapping 'stable_20' was designed for MC 1.8.8! Use at your own peril.
#################################################
         ForgeGradle 2.1-SNAPSHOT-4b34e5d        
  https://github.com/MinecraftForge/ForgeGradle  
#################################################
               Powered by MCP unknown               
             http://modcoderpack.com             
         by: Searge, ProfMobius, Fesh0r,         
         R4wk, ZeuX, IngisKahn, bspkrs           
#################################################
:clean
:deobfCompileDummyTask
:getVersionJson
:extractUserdev UP-TO-DATE
:downloadClient SKIPPED
:downloadServer SKIPPED
:splitServerJar SKIPPED
:mergeJars SKIPPED
:applyBinaryPatches SKIPPED
:deobfProvidedDummyTask
:extractDependencyATs SKIPPED
:extractMcpData SKIPPED
:extractMcpMappings SKIPPED
:genSrgs SKIPPED
:deobfMcMCP SKIPPED
:sourceApiJava
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
C:\Pylo\MCreator165\forge\build\sources\main\java\mod\mcreator\mcreator_toasterGUI.java:341: error: illegal start of expression
.decrStackSize(2, 1);
^
C:\Pylo\MCreator165\forge\build\sources\main\java\mod\mcreator\mcreator_toasterGUI.java:345: error: illegal start of expression
.setInventorySlotContents(0, new ItemStack(mcreator_toast.block, 6));
^
C:\Pylo\MCreator165\forge\build\sources\main\java\mod\mcreator\mcreator_toasterGUI.java:349: error: illegal start of expression
.setInventorySlotContents(1, new ItemStack(mcreator_burntToast.block, 2));
^
3 errors
: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: 20.195 secs
C:\Pylo\MCreator165\forge>
Task completed with return code 0 in 20820 milliseconds

How do I fix this? I need to know. If you need more code, let me know.

WARNING: I am not a java expert! Please, do not get angry if I don't understand. Try simple words if I don't get what you're saying.

 

Edited by TLORD765 on Sat, 04/02/2016 - 16:39
Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Actually, what should I put
Sat, 04/02/2016 - 16:42

Actually, what should I put in front of the periods before the expression? Thanks!

Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I solved my problem. :) I
Sat, 04/02/2016 - 17:10

I solved my problem. :) I feel accomplished.

Joined May 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So what was the solution? I'm
Wed, 05/11/2016 - 03:50

So what was the solution? I'm having the same problem, creating an alchemy table for turning iron to gold. 

Joined Mar 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And now I'm having that…
Sun, 12/10/2017 - 00:02

And now I'm having that issue! What was the solution?

BUILD FAILED
C:\Pylo\MCreator176\forge\build\sources\main\java\mod\mcreator\mcreator_forg: error: illegal start of expression
eGUI.java:136.decrStackSize(2, 1);
Total time: 9.916 secs
^
C:\Pylo\MCreator176\forge\build\sources\main\java\mod\mcreator\mcreator_forgeGUI.java:140: error: illegal start of expression
.setInventorySlotContents(1, new ItemStack(mcreator_forgedIron.block, 1));
^
C:\Pylo\MCreator176\forge\build\sources\main\java\mod\mcreator\mcreator_forgeGUI.java:191: error: illegal start of expression
.decrStackSize(5, 1);
^
C:\Pylo\MCreator176\forge\build\sources\main\java\mod\mcreator\mcreator_forgeGUI.java:199: error: illegal start of expression
.decrStackSize(6, 1);
^
C:\Pylo\MCreator176\forge\build\sources\main\java\mod\mcreator\mcreator_forgeGUI.java:203: error: illegal start of expression
.setInventorySlotContents(4, new ItemStack(mcreator_forgedSteel.block, 1));
^
C:\Pylo\MCreator176\forge\build\sources\main\java\mod\mcreator\mcreator_forgeGUI.java:254: error: illegal start of expression
.decrStackSize(7, 1);
^
C:\Pylo\MCreator176\forge\build\sources\main\java\mod\mcreator\mcreator_forgeGUI.java:262: error: illegal start of expression
.decrStackSize(9, 1);
^
C:\Pylo\MCreator176\forge\build\sources\main\java\mod\mcreator\mcreator_forgeGUI.java:266: error: illegal start of expression
.setInventorySlotContents(8, new ItemStack(mcreator_forgedGold.block, 1));
^
9 errors