Results 1 to 4 of 4
Thread: Java Error. Please Help
- 06-23-2011, 02:08 AM #1
Member
- Join Date
- Jun 2011
- Posts
- 1
- Rep Power
- 0
Java Error. Please Help
ErrorPHP Code:package net.minecraft.src; import java.util.Random; public class BlockNewore extends Block { public BlockNewOre(int i, int j); { super(i, j, Material.rock); } public int idDropped(int i, Random random); { return mod_Ore.newore.BlockID; } }I don't Get What To Do. Please tell me.31: unclosed string literal
newore = new BlockNewOre(1000, ModLoader.addOverride("/terrain.png", "/Mod/Blocks/ore.png)).setHardness(1.5F).setResistance(2.0F).se tBlockName("newore");
- 06-23-2011, 02:20 AM #2
The error is where the compiler tells you it is, not in the code you posted. Count the double quotes (") in line 31 of whatever file has the line in the error message. Do you get an even or odd number?
In future, whenever seeking help with an error, post the entire stack trace, from beginning to end.
db
- 06-23-2011, 02:47 AM #3
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
Another problem you will run into is that your constructor does not have the same name as the class(capitalization is important)
- 06-23-2011, 03:56 AM #4
Looks like /Mod/Blocks/ore.png has a quotation mark at the beginning, but not at the end. That's an unclosed string literal.
Using a syntax highlighting editor will help you spot things like this.Get in the habit of using standard Java naming conventions!
Similar Threads
-
java.sql.SQLException: System or internal error java.io.IOException: Stream closed
By ashok bhagat in forum Advanced JavaReplies: 0Last Post: 01-21-2011, 12:43 PM -
how to solve this ERROR --java.lang.OutOfMemoryError: Java heap space
By krunalpatel1410 in forum New To JavaReplies: 5Last Post: 08-13-2010, 10:04 AM -
java out of memory error-heap space error
By elsanthosh in forum NetBeansReplies: 4Last Post: 06-15-2010, 09:31 AM -
Thread: Error 500--Internal Server Error java.lang.NullPointerException
By jackdear44 in forum New To JavaReplies: 1Last Post: 12-05-2009, 07:28 AM -
java.lang.Error: Error opening DSound for capture
By NARs in forum NetworkingReplies: 1Last Post: 10-26-2009, 04:38 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks