Scoring a Input one letter at a time

Blitz3D Forums/Blitz3D Programming/Scoring a Input one letter at a time

jigga619(Posted 2010) [#1]
I know how to use the Input$ command, but what I want is for a person to gain 1 point everytime each LETTER of a pre chosen word is typed.......for example


score=5
;name should be Tom
name$=Input$("What is your name?")

.......Now right here, I want the players score to increase 1 unit if they press "T", 1 unit if they press "o" and 1 unit if they press "m".......if they enter any other letters their score is decreased by 1 unit for each wrong letter. How do I do this?


Matty(Posted 2010) [#2]
A function like the following should help you with this...

http://blitzbasic.com/codearcs/codearcs.php?code=207