Results 1 to 13 of 13
  1. #1
    Kodeee is offline Member
    Join Date
    Mar 2009
    Posts
    6
    Rep Power
    0

    Default Having error while compiling

    Im remaking a client to a game, but when I compile, i get this:

    Java Code:
    mudclient.java:1696: illegal start of expression
              goto _L1
              ^
    mudclient.java:1696: not a statement
              goto _L1
                   ^
    mudclient.java:1696: ';' expected
              goto _L1
                      ^
    mudclient.java:1749: illegal start of expression
              goto _L2
              ^
    mudclient.java:1749: not a statement
              goto _L2
                   ^
    mudclient.java:1749: ';' expected
              goto _L2
                      ^
    mudclient.java:1771: not a statement
            e;
            ^
    mudclient.java:7912: illegal start of expression
            if(true) goto _L2; else goto _L1
                     ^
    mudclient.java:7912: not a statement
            if(true) goto _L2; else goto _L1
                          ^
    mudclient.java:7912: 'else' without 'if'
            if(true) goto _L2; else goto _L1
                               ^
    mudclient.java:7912: illegal start of expression
            if(true) goto _L2; else goto _L1
                                    ^
    mudclient.java:7912: ';' expected
            if(true) goto _L2; else goto _L1
                                            ^
    12 errors
    I dont know much about java. Would somebody suggest something?

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    To be a legal expressions there are some rules to follows. One of them is, use of a semicolon at the end.

  3. #3
    Kodeee is offline Member
    Join Date
    Mar 2009
    Posts
    6
    Rep Power
    0

    Default

    Quote Originally Posted by Eranga View Post
    To be a legal expressions there are some rules to follows. One of them is, use of a semicolon at the end.
    Do u mean I have to add semicolon to the lines wheres illegal expression?
    Edit: well, i tried that, says still same. Only 9 errors now btw ^__^

    Java Code:
    mudclient.java:1696: illegal start of expression
              goto _L1;
              ^
    mudclient.java:1696: not a statement
              goto _L1;
                   ^
    mudclient.java:1749: illegal start of expression
              goto _L2;
              ^
    mudclient.java:1749: not a statement
              goto _L2;
                   ^
    mudclient.java:1771: not a statement
            e;
            ^
    mudclient.java:7912: illegal start of expression
            if(true) goto _L2; else goto _L1;
                     ^
    mudclient.java:7912: not a statement
            if(true) goto _L2; else goto _L1;
                          ^
    mudclient.java:7912: 'else' without 'if'
            if(true) goto _L2; else goto _L1;
                               ^
    mudclient.java:7912: illegal start of expression
            if(true) goto _L2; else goto _L1;
                                    ^
    9 errors
    Last edited by Kodeee; 03-15-2009 at 11:19 AM.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  5. #5
    Kodeee is offline Member
    Join Date
    Mar 2009
    Posts
    6
    Rep Power
    0

    Default

    Quote Originally Posted by Eranga View Post
    And also, do you know about labels in Java. Basically do you know what the meaning of goto?
    Yes I do, why?

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  7. #7
    Kodeee is offline Member
    Join Date
    Mar 2009
    Posts
    6
    Rep Power
    0

    Default

    Quote Originally Posted by Eranga View Post
    So you should know what's this.

    Java Code:
    goto _L1;
    Java Code:
    _L1:
                displayMessage((new StringBuilder()).append("Cannot find Script number: ").append(scriptNumber).toString(), 3, -1);
                Finish();
            }
    
            public void testScript()
            {
                int npcID = Integer.parseInt(arguments[2]);
                displayMessage("@ran@Monster Killer by xEnt!", 3, -1);
                while(ScriptRunning) 
                {
                    int Npc[] = GetNpcById(npcID);
                    SleepIfAt(99);
                    if(sleeping)
                    {
                        Wait(100);
                        testScript();
                    }
                    if(Npc[0] != -1 && !InCombat())
                    {
                        AttackNpc(Npc[0]);
                        Wait(300);
                    }
                    Wait(200);
                }
                Finish();
    Its that, I believe.

    Edit: Im using Dj Java Decompiler. When I decompile mudclient.jad it says the file is too large. Does it mean that it doesnt decompile it fully?
    Last edited by Kodeee; 03-15-2009 at 06:14 PM.

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  9. #9
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    7

    Default

    hmm.... i've always been under the impression that there is no goto in java...

  10. #10
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Yep, I try to get it from the OP.

    Quote Originally Posted by Eranga
    And also, do you know about labels in Java. Basically do you know what the meaning of goto?

  11. #11
    Kodeee is offline Member
    Join Date
    Mar 2009
    Posts
    6
    Rep Power
    0

    Default

    Quote Originally Posted by Eranga View Post
    So you are using someones' code.

    Is that decompiler given any fail message?
    It says that the file is too large.

  12. #12
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  13. #13
    Kodeee is offline Member
    Join Date
    Mar 2009
    Posts
    6
    Rep Power
    0

Similar Threads

  1. Compiling error in JCreator
    By ddatta8 in forum New To Java
    Replies: 0
    Last Post: 12-03-2008, 05:27 AM
  2. Error in compiling Firewall source code
    By ajib85 in forum Networking
    Replies: 8
    Last Post: 10-02-2008, 04:37 AM
  3. Compiling error
    By lawksalih in forum New To Java
    Replies: 6
    Last Post: 01-29-2008, 07:26 PM
  4. Error during compiling
    By boy22 in forum New To Java
    Replies: 2
    Last Post: 08-03-2007, 02:42 AM
  5. Error while compiling
    By ai_2007 in forum Advanced Java
    Replies: 1
    Last Post: 07-01-2007, 11:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •