Jump to content

Search the Community

Showing results for tags 'statement'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Found 7 results

  1. Hey everyone im getting this error! starting... src\com\rs\game\player\content\MaxedUser.java:12: error: unreachable statement return player.completedFightKiln = true; ^ 1 error Press any key to continue . . . And this is the code for it! Can anyone tell me how to fix it? or show? public static boolean isCompletionist(Player player) { return player.getSkills().getTotalLevel(player) == 2496; return player.completedFightKiln = true; }
  2. When i try to compile my server i get a not a statement error This is the file that's causing the error can anyone take a look? thanks :) it's not the whole file it's just the part of the .java that's causing the problem and then it says that the ? is not a statement [ATTACH]10124[/ATTACH]
  3. Well tbh I realize that this is a java tutorial really but at the end of the day I'm sick of seeing code else if(int) else if(int) over and over :S Use a switch statement ffs :S Here's how to do it: Example: (This code will obviously not work if you put it into your source its just an example.) [CODE] if (npc.id == 1) { do.something; } else if (npc.id == 2) { do.something; } else if (npc.id == 3) { do.something; } else if (npc.id == 4) { do.something; } else if (npc.id == 5) { do.something; } else if (npc.id == 6) { do.something; } else if (npc.id == 7) { do.something; And so on for about 100 npcs or for what ever else. } [/CODE] Don't you think this is allot more tidier and more easier to read? [CODE]switch(npc.id) { case 1: do.something; break; case 2: do.something; break; case 3: do.something; break; case 4: do.something; break; case 5: do.something; break; case 6: do.something; break; case 7: do.something; break; default: if (none of the npcs do anything) return; else do.something. break; }[/CODE] You can also do this for string values, which is very useful: example [CODE]String example; if(example.equalsIgnorecase("what ever") else if repeat like before [/CODE] You can just use [CODE]switch(example) { case "what ever": do.something; break; default: break; [/CODE] and so on for what ever the String example contains.
  4. oops the statement=symbol (mb) still need help hello i am coding about 3-4 years and try to add a mysterybox that gives rondom items now the problem is i do all coding but it wont work btw it is 317(pi) atleast that's the coding that works but i now get this error. "error could not find statement" now what i coded? itemassistant. [CODE]} public static int randomPrize() { return prize[(int) (Math.random() * prize.length)]; } public static int prize[] = { 6585, 4151 };[/CODE] for rewards there is the reward stuff for barrows also. than clickitem.java [CODE]} if(itemId == 6199) { c.addItem(Item.randomPrize(), 1); return;[/CODE] than there i got the problem that's this one, [CODE]c.addItem(Item.randomPrize(), 1); ^ error could not find statement.[/CODE] if someone could help me shall be nice
  5. Whenever I try to compile my client, I get these errors; [CODE]Class203.java:20: error: missing return statement } ^ Class203.java:31: error: missing return statement } ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errors Press any key to continue . . .[/CODE] Yes, I know the Note:'s aren't errors, I am talking about the missing return statement. So, if anyone knows a fix, please help me out and leave a comment below. Also, if you need the class203.java code, just say so and I will post it. ~TheSickSign
  6. hey guys I'm on a PI source and i was wondering wheres the statement that adds one level once xp required is reached is. because my summoning level doesn't go up when the required xp level is reached so i was hoping someone would help me fix that maybe give me a hint or just tell me
  7. I'm attempting to make it so that, a player cannot win multiple times in one lottery draw(Example: Player is winner and winner2). I'm also trying to make sure it doesn't go out of the array size and cause a player not to get rewarded when I add something to the array size to make a player not win multiple times. Anyone know of a better way of stating this?: [CODE] int arraySize = lotteryPlayersNames.size() - 1; int winner = Misc.random(arraySize); int winner2 = Misc.random(arraySize); int winner3 = Misc.random(arraySize); if(winner2+1 >= arraySize || winner3+1 >= arraySize) { if(winner == winner2) { winner2 -= 1; return; } if(winner2 == winner3) { winner3 -= 1; return; } if(winner == winner3) { winner3 -= 1; return; } } else { if(winner == winner2) { winner2 += 1; return; } if(winner2 == winner3) { winner3 += 1; return; } if(winner == winner3) { winner3 += 1; return; } }[/CODE]