Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

eclipse error

 
tim widlock
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone. Just to introduce myself my name is Tim i am brand new to this board. This is my first post. Google searched some stuff trying to figure out a eclipse error i was having maybe someone here could help me out. i write code for a game and am a beginner java user i know html pretty well and studies php mysql, and ccs. Right now im having an error in the ending of my code. My last }

This is last



Now this ^^^ has a red line and ive tried everything it wont go away. keeps saying


Syntax error, insert ";" to complete FieldDeclaration TimbosOakCutter.java /RSBot/src line 104 Java Problem

Syntax error, insert "}" to complete FieldDeclaration TimbosOakCutter.java /RSBot/src line 104 Java Problem

Syntax error, insert "}" to complete FieldDeclaration TimbosOakCutter.java /RSBot/src line 104 Java Problem

Syntax error, insert "}" to complete FieldDeclaration TimbosOakCutter.java /RSBot/src line 104 Java Problem


Can someone please help me out. If you need to see full code let me know ill message you it. Anyone could help as soon as possible ill be checking this board all night to see if i get a response. Thanks and hello again!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim,
Welcome to CodeRanch! I've added [ code ] tags around your code so the indentation is preserved.

The code looks fine. One thing to try to debug is to comment out one method at a time to see when the error goes away. Then pieces of a method. Once you have a smaller chunk of code, either the error will be more obvious or post the non-commented posts as a reply here.
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch! My name is Tim, too!

As Jeanne has said, there's nothing obviously wrong with your code.

That means one of 2 things is likely.

1. You have a problem at an outer level of the code that's manifesting itself as though it's a problem at the inner level. Typically something like a mismatched brace or missing semicolon. That's the most common case. So look "uphill" from that method and see if you can spot something. Note that Eclipse will highlight (subtly) paired constructs such as braces, parentheses and so forth when you put the cursor on them. Missing quotes are usually easier to see, since strings are colored.

2. It is possible that Eclipse has become internally corrupt and lost track of things. This is much more common in their XML editor (which is pretty shoddy) than in their Java editor, but it can happen. Generally shutting down and restarting Eclipse will clear that.

In most situations, it's going to be case #1.
 
tim widlock
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heres my code

http://pastebin.com/9072zWFv

Thanks a lot if you could help me out.



Syntax error, insert ";" to complete FieldDeclaration TimbosOakCutter.java /RSBot/src line 101 Java Problem

Syntax error, insert "}" to complete FieldDeclaration TimbosOakCutter.java /RSBot/src line 101 Java Problem

Syntax error, insert "}" to complete FieldDeclaration TimbosOakCutter.java /RSBot/src line 101 Java Problem

Syntax error, insert "}" to complete FieldDeclaration TimbosOakCutter.java /RSBot/src line 101 Java Problem
 
Greg Brannon
Bartender
Posts: 563
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, it's not an Eclipse error. It's a Java error, syntax, I think.

I think your problem is in the following code that you never quite finished or wrote correctly:

 
tim widlock
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GREG!!! you made my night. thanks a million man. found 3 missing things fixed em and boom. Like i said brand new to java. plan to stay on this board thanks for the help everyone!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic