Results 1 to 4 of 4
Thread: Java "Identifier Expected" Error
- 03-15-2012, 04:48 PM #1
Member
- Join Date
- Mar 2012
- Posts
- 2
- Rep Power
- 0
Java "Identifier Expected" Error
I have been trying to recompile this but I keep getting an <Identifier> Expected error on line 11.
This is not the whole code. Any help would be greatly appreciated!Java Code:package net.minecraft.src; import java.util.Random; public static final class mod_CookieArmor extends BaseMod { public static final Item body = new ItemArmor(3000, EnumArmorMaterial.COOKIE, ModLoader.AddArmor("body"), 1).setItemName("Cookie Chestplate"); public static final Item legs = new ItemArmor(3001, EnumArmorMaterial.COOKIE, ModLoader.AddArmor("legs"), 2).setItemName("Cookie Leggings"); public static final Item helmet = new ItemArmor(3002, EnumArmorMaterial.COOKIE, ModLoader.AddArmor("helmet"), 3).setItemName("Cookie Helmet"); public static final Item boots = new ItemArmor(3003, EnumArmorMaterial.COOKIE, ModLoader.AddArmor("boots"), 0).setItemName("Cookie Boots"); public static final void(); mod_CookieArmor() { ModLoader.AddName(body, "Cookie Chestplate"); body.iconIndex = ModLoader.addOverride("/gui/items.png", "/Body.png"); ModLoader.AddRecipe(new ItemStack(body, 1), new Object[]{ "* *", "***", "***", Character.valueOf('*'), Item.cookie
- 03-15-2012, 04:59 PM #2
Re: Java "Identifier Expected" Error
What is this supposed to do:
That is not proper syntax for declaring a method.Java Code:public static final void(); mod_CookieArmor() {How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 03-15-2012, 05:06 PM #3
Member
- Join Date
- Mar 2012
- Posts
- 2
- Rep Power
- 0
Re: Java "Identifier Expected" Error
So how could I fix it? Sorry I'm very new to java.
- 03-15-2012, 05:09 PM #4
Re: Java "Identifier Expected" Error
This is the first result of googling "java method declaration": Defining Methods (The Java™ Tutorials > Learning the Java Language > Classes and Objects)
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
Similar Threads
-
"Identifier expected" problem
By turtlish in forum New To JavaReplies: 4Last Post: 12-09-2011, 07:30 PM -
Can't import my own class, getting a " ';' expected" error
By cjfshaw in forum New To JavaReplies: 4Last Post: 10-20-2011, 05:10 AM -
java.sql.SQLException: ORA-00904: "PASS1": invalid identifier
By vishal.jar in forum JDBCReplies: 3Last Post: 01-31-2011, 09:46 AM -
Syntax error on token "(", ; expected
By romilc in forum New To JavaReplies: 7Last Post: 10-24-2009, 01:23 AM -
error"<identifier> expected" trough the use of interface
By parme in forum New To JavaReplies: 3Last Post: 12-05-2008, 08:34 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks