detect string length ???

Hi.
is there a way to detect string lenght of characters in a string attribute.????
Cheers
is there a way to detect string lenght of characters in a string attribute.????
Cheers
Comments
(for comparison of yours/players entry)
make an attribute integer type: correctStringCount
make an attribute integer type: playerStringCount
In yourEntry: count the letters,#,punctuation, spaces
that count would be in game.correctStringCount
In playerEntry: whenever they tap the keyboard and that action adds to string include:
a changeAttribute: game.playerStringCount To: playerStringCount+1
(when they enter [delete X] changeAttribute: game.playerStringCount To: game.playerStringCount-1)
Rule: when game.playerStringCount = game.correctStringCount
--do this or that
Otherwise:
--do something else
MH
what daunts us: it is all so foreign looking …
while the word/vocabulary can be learned without difficulty … (focus on this, first!)
the grammatical structure/punctuation upsets all our previous learning of how things should be said/written!
and ultimately, stating things so a linear and logical (but, unreasonable) computer can/does … read/write/manipulate our instructions.
GS is a great place to start learning the language!
MH
Hard no, taking time and effort, yes.
You just have to learn what words represent what, and what punctuation follows them.
contain 2 characters. is there such as thing ???.
e.g. string attrib/var is string1="AB"
display test(string1)
so now if a user hit other letters then i dont want it to add any more.
Appreciate your help guys.
2 text gameAttributes … text1 and text2
2 actors … one for 10ths and one for ones
-have the width just large enough to show 1 digit in the font and fontSize you want … (actually fontSize should work for most widths)
-have the height = to your fontSize - 5 or 6
10thsText actor
Rule: when
game.Text1 is (and, leave that blank)
-Keyboard Input behavior
Display Text behavior
Text: text1
Align: left … and √ Wrap inside Actor
same for 1sText actor (but text2 display)
MH
your logic sounds great. will attempt.