Thread: 718/742 Triviabot.java source error [HELP]

Results 1 to 7 of 7
  1. #1 718/742 Triviabot.java source error [HELP] 
    Registered Member
    Join Date
    Jan 2012
    Posts
    9
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Ok so i did something i don't remember adding and when i compile i get this.

    starting...
    src\com\rs\game\TriviaBot.java:1: error: illegal character: \187
    package com.rs.game.player.content;
    ^
    src\com\rs\game\TriviaBot.java:1: error: illegal character: \191
    package com.rs.game.player.content;
    ^
    2 errors
    Press any key to continue . . .

    NOW heres my Triviabot.java file.

    package com.rs.game.player.content;

    import com.rs.game.World;
    import com.rs.game.player.Player;

    import java.util.Random;

    /**
    * @Author: Apache Ah64
    */
    public class TriviaBot {

    private static String questions[][] = {
    { "What is Santa Claus's real name?", "Nick" },
    { "In what year did Jagex release dungeoneering?", "2010" },
    { "What was the first obsidian weapon Jagex released?",
    "Dark dagger" },
    { "Who is the co founder of Jagex Studios?", "Andrew Gower" },
    { "Who is the creator of RuneScape?", "Andrew Gower" },
    { "What was the first minigame in RuneScape?", "Clan wars" },
    { "What gaming genre is Matrix?", "MMORPG" },
    { "In what year was RuneScape established?", "2001" },
    { "In what year was RuneScape HD released?", "2008" },
    { "What is the Matrix game playing mode? (Multiplayer/Solo)",
    "Multiplayer" },
    { "What is maximum combat level in Tellerium?", "138" },
    { "Is a tomato a fruit or a vegetable?", "Fruit" },
    { "How many legs does a spider have?", "8" },
    { "Why is activity Monte Carlo mostly known for?", "Casino" },
    { "Who sings the song 'I wanna be a billionaire'?", "Travy Mccoy" },
    { "Until what year did the beatles exist?", "1970" },
    { "Did RuneScape ever obtain the item Life rune? (Yes/No)", "Yes" },
    { "What was the Falador Masaacre?", "A glitch" },
    { "In what year was the Duplication Glitch in RuneScape?", "2003" },
    { "What month of 2011 was Matrix released to the public", "October" },
    { "Who created the Trivia Bot?", "Apache Ah64" },
    { "What is the attack requirement for Goliath Gloves?", "80" },
    { "Where is the Wise Old Man located at?", "Draynor Manor" },
    { "What is the most powerful curse?", "Turmoil" },
    {
    "How much of a percentage does a dragon dagger special requires?",
    "25%" },
    { "What color does a donator sign have?", "Green" },
    { "What's the name of the dungeon master?", "Thok" },
    { "What is the best free to play armour?", "Rune" },
    { "Where do you get Zeals at?", "Soul wars" },
    { "What amulet does Imp Catcher give?", "Amulet of Accuracy" },
    {
    "Fill out the good part of the name in the omitted part, `...... the mad�?",
    "Melzar" },
    { "Which Non Player Character drops sigils?", "Corporeal beast" },
    { "What do you receive when a fire disappears?", "Ashes" },
    { "What is the name of the new firecape?", "TokHaar-Kal" } };

    public static int questionid = -1;
    public static int round = 0;
    public static boolean victory = false;

    public TriviaBot() {
    // TODO
    }

    public static void Run() {
    int rand = RandomQuestion();
    questionid = rand;
    victory = false;
    for (Player participant : World.getPlayers()) {
    if (participant == null)
    continue;
    if (TriviaArea(participant)) {
    participant.getPackets().sendGameMessage(
    "[Trivia]" + questions[rand][0]);
    }
    }
    }

    public static void sendRoundWinner(String winner) {
    for (Player participant : World.getPlayers()) {
    if (participant == null)
    continue;
    if (TriviaArea(participant)) {
    victory = true;
    participant.getPackets().sendGameMessage(
    "[Trivia]Congratulations, " + winner + " won round "
    + round + ".");
    }
    }
    }

    public static void verifyAnswer(final Player player, String answer) {
    if (victory) {
    player.getPackets()
    .sendGameMessage(
    "That round has already been won, wait for the next round.");
    } else if (questions[questionid][1].equalsIgnoreCase(answer)) {
    round++;
    sendRoundWinner(player.getDisplayName());
    } else {
    player.getPackets().sendGameMessage(
    "That answer wasn't correct, please try it again.");
    }
    }

    public static int RandomQuestion() {
    int random = 0;
    Random rand = new Random();
    random = rand.nextInt(questions.length);
    return random;
    }

    public static boolean TriviaArea(final Player participant) {
    if (participant.getX() >= 2630 && participant.getX() <= 2660
    && participant.getY() >= 9377 && participant.getY() <= 9400) {
    return true;
    }
    return false;
    }
    }
    Any Help would be greatly appreciated. Thanks.
     

  2. #2  
    Extreme Donator


    Join Date
    Feb 2009
    Posts
    361
    Thanks given
    53
    Thanks received
    85
    Rep Power
    177
    edit:nvm.
     

  3. #3  
    Registered Member
    Join Date
    Jan 2012
    Posts
    9
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Could you be more specific please [:
     

  4. #4  
    Banned
    Join Date
    Feb 2013
    Age
    28
    Posts
    16
    Thanks given
    1
    Thanks received
    6
    Rep Power
    0
    Code tags please...
     

  5. #5  
    Registered Member
    Join Date
    Jan 2012
    Posts
    9
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    *updated
     

  6. #6  
    Success is the worst teacher

    Santa Hat's Avatar
    Join Date
    Oct 2012
    Age
    27
    Posts
    3,334
    Thanks given
    807
    Thanks received
    1,185
    Rep Power
    190
    by the error it tells you theres an illegal character here: package com.rs.game.player.content;

    do u have a space or anything before the: package com.rs.game.player.content;

    or a random letter or symbol


     

  7. #7  
    Donator

    Join Date
    Jan 2014
    Posts
    1,617
    Thanks given
    8
    Thanks received
    196
    Rep Power
    39
    Quote Originally Posted by Santa Hat View Post
    by the error it tells you theres an illegal character here: package com.rs.game.player.content;

    do u have a space or anything before the: package com.rs.game.player.content;

    or a random letter or symbol
    Hey Santa I also have this problem and I do not have a symbol next to a package com.rs etc. I have the same problem as
    this person here he posted also help, so someone gave him a link to a new TriviaBot.Java and it worked.
    The link is here, Thread: Triviabot Error 718 (NRS3) V4 [Solved]

    Code:
    Compiling
    src\com\rs\game\player\content\TriviaBot.java:1: error: illegal character: \187
    package com.rs.game.player.content;
     ^
    src\com\rs\game\player\content\TriviaBot.java:1: error: illegal character: \191
    package com.rs.game.player.content;
      ^
    src\com\rs\game\World.java:55: error: cannot access TriviaBot
    import com.rs.game.player.content.TriviaBot;
                                     ^
      bad source file: src\com\rs\game\player\content\TriviaBot.java
        file does not contain class com.rs.game.player.content.TriviaBot
        Please remove or make sure it appears in the correct subdirectory of the sou
    rcepath.
    src\com\rs\game\player\content\TriviaBot.java:1: error: illegal character: \187
    package com.rs.game.player.content;
     ^
    src\com\rs\game\player\content\TriviaBot.java:1: error: illegal character: \191
    package com.rs.game.player.content;
      ^
    src\com\rs\game\World.java:55: error: cannot access TriviaBot
    import com.rs.game.player.content.TriviaBot;
                                     ^
      bad source file: src\com\rs\game\player\content\TriviaBot.java
        file does not contain class com.rs.game.player.content.TriviaBot
        Please remove or make sure it appears in the correct subdirectory of the sou
    rcepath.
    Complete
    Press any key to continue . .
     


Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Triviabot Error 718 (NRS3) V4 [Solved]
    By Mephobia in forum Help
    Replies: 7
    Last Post: 02-17-2014, 07:10 PM
  2. Replies: 10
    Last Post: 11-08-2010, 11:39 AM
  3. Replies: 6
    Last Post: 05-01-2010, 05:18 AM
  4. Replies: 116
    Last Post: 10-15-2008, 08:13 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
  •