Thread: Help me with Trivia please!!

Results 1 to 8 of 8
  1. #1 Help me with Trivia please!! 
    Registered Member Ahmed Di Maria's Avatar
    Join Date
    Mar 2013
    Age
    25
    Posts
    141
    Thanks given
    50
    Thanks received
    7
    Rep Power
    14
    So.. basically I've followed this snippet http://www.rune-server.org/runescape...rivia-bot.html

    The problem is, When the bot sends the questions and then I type ::answer [answer here] it always says incorrect answer when it is correct.
    I am using InsidiaX as base, I dont wantany suggestions for any other bases.

    Here is my ::answer commands:
    Code:
    if (playerCommand.startsWith("answer")) {
    			String answer = playerCommand;
    			TriviaBot.attemptQuestion(c, answer);
    		}
    Please guys help me I really need this. Will rep++
    Reply With Quote  
     

  2. #2  
    Registered Member Ahmed Di Maria's Avatar
    Join Date
    Mar 2013
    Age
    25
    Posts
    141
    Thanks given
    50
    Thanks received
    7
    Rep Power
    14
    bumpp
    Reply With Quote  
     

  3. #3  
    Registered Member
    CTucker's Avatar
    Join Date
    Oct 2008
    Posts
    2,422
    Thanks given
    263
    Thanks received
    281
    Rep Power
    343
    Just a wild guess, but...
    Try to send the answer, not the command?

    Look into Substrings, or a command.split.

    Code:
    if(playerCommand.startsWith("answer")) {
        String answer = playerCommand.subString(6);
    Reply With Quote  
     

  4. #4  
    Registered Member Ahmed Di Maria's Avatar
    Join Date
    Mar 2013
    Age
    25
    Posts
    141
    Thanks given
    50
    Thanks received
    7
    Rep Power
    14
    Quote Originally Posted by Jellal View Post
    Just a wild guess, but...
    Try to send the answer, not the command?

    Look into Substrings, or a command.split.

    Code:
    if(playerCommand.startsWith("answer")) {
        String answer = playerCommand.subString(6);
    Well that didn't work, Screenshot by Lightshot Please I'm a bit new with coding, so please just post me codes and stuff u kno and explainable
    Reply With Quote  
     

  5. #5  
    oof


    Join Date
    Aug 2012
    Posts
    3,150
    Thanks given
    2,847
    Thanks received
    857
    Rep Power
    2260
    substring should be lowercase.
    Reply With Quote  
     

  6. #6  
    Registered Member Ahmed Di Maria's Avatar
    Join Date
    Mar 2013
    Age
    25
    Posts
    141
    Thanks given
    50
    Thanks received
    7
    Rep Power
    14
    Still doesn't work!!! bumpp someone!!
    Reply With Quote  
     

  7. #7  
    Registered Member Ahmed Di Maria's Avatar
    Join Date
    Mar 2013
    Age
    25
    Posts
    141
    Thanks given
    50
    Thanks received
    7
    Rep Power
    14
    bumpppppp
    Reply With Quote  
     

  8. #8  
    Server developer


    Join Date
    Jul 2010
    Posts
    881
    Thanks given
    265
    Thanks received
    55
    Rep Power
    94
    Should work [it does, because I also use that one]

    Code:
    	if (playerCommand.startsWith("answer")) {
    			String answer = playerCommand.substring(7);
    			TriviaBot.attemptQuestion(c, answer);
    		}
    Reply With Quote  
     


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. help me with this please WILL REP
    By Kenaboy in forum Help
    Replies: 1
    Last Post: 10-08-2010, 12:43 PM
  2. Help me with client please :O
    By Larsson in forum Help
    Replies: 4
    Last Post: 05-07-2009, 01:56 AM
  3. Help me with this please
    By Ventrix in forum Help
    Replies: 1
    Last Post: 01-23-2009, 09:51 AM
  4. Help me with FullScreen please.
    By DoekieScape in forum Help
    Replies: 0
    Last Post: 01-15-2009, 05:45 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •