bumpp
|
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:
Please guys help me I really need this. Will rep++Code:if (playerCommand.startsWith("answer")) { String answer = playerCommand; TriviaBot.attemptQuestion(c, answer); }
bumpp
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
substring should be lowercase.
Still doesn't work!!! bumpp someone!!
bumpppppp
Should work [it does, because I also use that one]
Code:if (playerCommand.startsWith("answer")) { String answer = playerCommand.substring(7); TriviaBot.attemptQuestion(c, answer); }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |