Having a text string, check a table for correct answer?

mounted88mounted88 Member Posts: 1,113
Ive recently followed tshirtbooth video on how to make a custom keyboard and insert text string. But does anyone have a suggestion how I can have that check a table to see if what was answered is correct? I've been trying different things for a couple days and cant get it. I know im over looking something here, because im sure its a easy process to accomplish.

Comments

  • ShmirlyWhirlShmirlyWhirl Member Posts: 189
    While I could explain it, tshirtbooth or gshelper.com has a template with a 60,000 word dictionary/word checker. I think it's free, so that would be a good place to start.
  • mounted88mounted88 Member Posts: 1,113
  • TheGabfatherTheGabfather Member Posts: 633
    edited April 2013
    Sure! :) this is common in quiz-type games. I like to make it so that the function that checks would have to check the least number of cells.

    Simple example with 1 Table for all Levels:
    - Say for a quiz game I'm at Level 2, answering question 5.
    - I start searching at Row 11 (because I know that's where the 10 sets of questions for Level 2 start) and work my way somehow to Row 15 (because this is where Level 2 Question 5 is located). You can work out your Rules for this on your own using simple math, I'm sure :)
    - Then just do a simple Attribute check if the answer given is equal to the answer or answers in the selected Row. You will probably have tableCellValue( ) on the right-hand side.
    - If you're making a quiz game with several possible answers for a given question, you can assign multiple columns for possible answers and just skim through them each time :) kinda like a pseudo-Regular Expression check.

    Good luck!
Sign In or Register to comment.