Thread: clickingmost.java error! please look

Results 1 to 7 of 7
  1. #1 clickingmost.java error! please look 
    Registered Member
    Join Date
    Sep 2009
    Posts
    527
    Thanks given
    22
    Thanks received
    10
    Rep Power
    30
    Code:
    case 73112:
    if (!c.HasItemAmount(553, 4) || !c.HasItemAmount(560, 2) || !c.HasItemAmount(557, 10)) {
    c.humidify();
    }else
    c.sM("You do not have enough runes to cast this spell");
    }


    error:
    Code:
    COMPILING... 
    clickingMost.java:2623: orphaned case
    case 73168:
    ^
    clickingMost.java:4040: class, interface, or enum expected
    }→
    ^
    2 errors
    Press any key to continue . . .
    Reply With Quote  
     

  2. #2  
    Registered Member
    Its paris's Avatar
    Join Date
    Apr 2009
    Posts
    1,141
    Thanks given
    56
    Thanks received
    228
    Rep Power
    689
    These 2 errors are most likely one and the same.
    It's very likely you've closed the switch statement too fast (before the relevant case).
    Look for the ending bracket that's currently part of the switch statement and remove it (or put it in the right place if the original one isn't there anymore).
    Reply With Quote  
     

  3. #3  
    Registered Member
    Division's Avatar
    Join Date
    Dec 2009
    Age
    24
    Posts
    2,208
    Thanks given
    41
    Thanks received
    78
    Rep Power
    97
    You didnt close it?
    Add "break;" after it
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Sep 2009
    Posts
    527
    Thanks given
    22
    Thanks received
    10
    Rep Power
    30
    tried that same error
    Reply With Quote  
     

  5. #5  
    Registered Member
    Purple's Avatar
    Join Date
    Feb 2010
    Age
    24
    Posts
    2,799
    Thanks given
    467
    Thanks received
    260
    Rep Power
    312
    case 73112:
    if (!c.HasItemAmount(553, 4) || !c.HasItemAmount(560, 2) || !c.HasItemAmount(557, 10)) {
    c.humidify();
    }else {
    c.sM("You do not have enough runes to cast this spell");
    }

    You forgot another open bracket, and case case 73168: already exists.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Its paris's Avatar
    Join Date
    Apr 2009
    Posts
    1,141
    Thanks given
    56
    Thanks received
    228
    Rep Power
    689
    Quote Originally Posted by Division View Post
    You didnt close it?
    Add "break;" after it
    break; doesn't close the switch-statement itself (in one way it does, but the closing is actually done by brackets), just the case(s).

    Quote Originally Posted by Aidi View Post
    You forgot another open bracket, and case case 73168: already exists.
    Orphaned case isn't the same as duplicate label, although the opening bracket could've caused it indeed. Didn't even notice it.
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Sep 2009
    Posts
    527
    Thanks given
    22
    Thanks received
    10
    Rep Power
    30
    nvm fixed
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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