Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » i get a few errors in my compiler also
i get a few errors in my compiler also [message #876270] Thu, 24 May 2012 05:26 Go to next message
Jack Zeller is currently offline Jack Zeller
Messages: 4
Registered: May 2012
Junior Member
src\server\model\players\Client.java:737: error: illegal start of expression
        public KillingStreak getStreak() {
        ^
src\server\model\players\Client.java:737: error: ';' expected
        public KillingStreak getStreak() {
                                      ^
src\server\model\players\KillingStreak.java:53: error: malformed floating point
literal
                        } else if (c..killStreak == 2) {
                                    ^
src\server\model\players\KillingStreak.java:53: error: ';' expected
                        } else if (c..killStreak == 2) {
                                      ^
src\server\model\players\KillingStreak.java:53: error: illegal start of expressi
on
                        } else if (c..killStreak == 2) {
                                                 ^
src\server\model\players\KillingStreak.java:53: error: ';' expected
                        } else if (c..killStreak == 2) {
                                                   ^
src\server\model\players\KillingStreak.java:53: error: illegal start of expressi
on
                        } else if (c..killStreak == 2) {
                                                     ^
src\server\model\players\KillingStreak.java:53: error: ';' expected
                        } else if (c..killStreak == 2) {
                                                      ^
src\server\model\players\KillingStreak.java:55: error: illegal start of type
                        } else if (c.killStreak == 3) {
                          ^
src\server\model\players\KillingStreak.java:55: error: ';' expected
                        } else if (c.killStreak == 3) {
                              ^
src\server\model\players\KillingStreak.java:55: error: illegal start of type
                        } else if (c.killStreak == 3) {
                                  ^
src\server\model\players\KillingStreak.java:55: error: ';' expected
                        } else if (c.killStreak == 3) {
                                    ^
src\server\model\players\KillingStreak.java:55: error: <identifier> expected
                        } else if (c.killStreak == 3) {
                                               ^
src\server\model\players\KillingStreak.java:55: error: illegal start of type
                        } else if (c.killStreak == 3) {
                                                   ^
src\server\model\players\KillingStreak.java:55: error: <identifier> expected
                        } else if (c.killStreak == 3) {
                                                    ^
src\server\model\players\KillingStreak.java:55: error: ';' expected
                        } else if (c.killStreak == 3) {
                                                     ^
src\server\model\players\KillingStreak.java:56: error: <identifier> expected
                                        c.getItems().addItem(995,3000000);
                                                  ^
src\server\model\players\KillingStreak.java:56: error: ';' expected
                                        c.getItems().addItem(995,3000000);
                                                    ^
src\server\model\players\KillingStreak.java:57: error: class, interface, or enum
 expected
                        } else if (c.killStreak == 4) {
                          ^
src\server\model\players\KillingStreak.java:59: error: class, interface, or enum
 expected
                        } else if (c.killStreak == 5) {
                        ^
src\server\model\players\KillingStreak.java:61: error: class, interface, or enum
 expected
                        } else if (c.killStreak == 6) {
                        ^
src\server\model\players\KillingStreak.java:63: error: class, interface, or enum
 expected
                        }
                        ^
src\server\model\players\KillingStreak.java:73: error: class, interface, or enum
 expected
                public void checkKillStreak() {
                       ^
src\server\model\players\KillingStreak.java:77: error: class, interface, or enum
 expected
                                        break;
                                        ^
src\server\model\players\KillingStreak.java:78: error: class, interface, or enum
 expected
                                case 3:
                                ^
src\server\model\players\KillingStreak.java:80: error: class, interface, or enum
 expected
                                        break;
                                        ^
src\server\model\players\KillingStreak.java:81: error: class, interface, or enum
 expected
                                case 4:
                                ^
src\server\model\players\KillingStreak.java:83: error: class, interface, or enum
 expected
                                        break;
                                        ^
src\server\model\players\KillingStreak.java:84: error: class, interface, or enum
 expected
                                case 5:
                                ^
src\server\model\players\KillingStreak.java:86: error: class, interface, or enum
 expected
                                        break;
                                        ^
src\server\model\players\KillingStreak.java:87: error: class, interface, or enum
 expected
                                case 6:
                                ^
src\server\model\players\KillingStreak.java:89: error: class, interface, or enum
 expected
                                        break;
                                        ^
src\server\model\players\KillingStreak.java:90: error: class, interface, or enum
 expected
                                }
                                ^
src\server\model\players\KillingStreak.java:99: error: class, interface, or enum
 expected
                public void killedPlayer() {
                       ^
src\server\model\players\KillingStreak.java:101: error: class, interface, or enu
m expected
                                if (o.killStreak >= 2 || c.killerId != o.playerI
d) {
                                ^
src\server\model\players\KillingStreak.java:103: error: class, interface, or enu
m expected
                                                Rewards();
                                                ^
src\server\model\players\KillingStreak.java:104: error: class, interface, or enu
m expected
                                                }
                                                ^
37 errors
Press any key to continue . . .







Where can i learn to write java, itll be easier to make my stuff
Re: i get a few errors in my compiler also [message #876288 is a reply to message #876270] Thu, 24 May 2012 06:10 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan Herrmann
Messages: 975
Registered: July 2009
Senior Member
Jack Zeller wrote on Thu, 24 May 2012 11:26
src\server\model\players\Client.java:737: error: illegal start of expression
        public KillingStreak getStreak() {
        ^



When you see a syntax error of this kind, don't just look at the location where the error is marked: The message "illegal start of expression" tells you that the compiler expects an expression, but what we see is a method declaration. So you need to look back to find out why an expression was expected. What is the context? This is nothing we can see from the extract that you have shown us.

Stephan

[Updated on: Thu, 24 May 2012 06:11]

Report message to a moderator

Re: i get a few errors in my compiler also [message #876410 is a reply to message #876288] Thu, 24 May 2012 10:35 Go to previous message
Eclipse User
Also, one more thing. It doesn't look like you are using Eclipse.
Eclipse wouldn't list errors in this format.

This is an Eclipse JDT forum, not a general Java problem forum.

As for learning Java, there are many good Java introduction books out in
the marketplace. They would help you learn Java.
Previous Topic:java content assist question?
Next Topic:Errors in setting up JSF in a dynamic web module.
Goto Forum:
  


Current Time: Tue Jul 22 03:33:52 EDT 2014

Powered by FUDForum. Page generated in 0.01591 seconds