Posted By: Rasch
Empty Strings that will fill with inkey. - 04/16/10 10:03
Hi there,
i got a problem. Maybe it is extrem easy and i just dont get it or it is more complicated.
At the moment i´m creating a login system. It is very simple and just .txt layered.
The first thing i do is create my Strings.
The i have my input field with inkey function, a login and a register button.
Now what i want is. If player press the register button it should check if mininum 3 characters are typed in. That does not work because my strings are already 10 characters longs even if they dont have any characters in it.
This depends on the "#10" after string creation. So everytime i click register it checks the inputs and says: "yes theres is more than 3 characters." But there isnt.
This is the check code.
If i create my strings with this one: ""
I just have one character to type in with inkey.
Now how can i manage it that my strings are all 1 character long as long as there is no inkey input?
i got a problem. Maybe it is extrem easy and i just dont get it or it is more complicated.
At the moment i´m creating a login system. It is very simple and just .txt layered.
The first thing i do is create my Strings.
Code:
STRING* id_input = "#10"; STRING* pw_input = "#10";
The i have my input field with inkey function, a login and a register button.
Now what i want is. If player press the register button it should check if mininum 3 characters are typed in. That does not work because my strings are already 10 characters longs even if they dont have any characters in it.
This depends on the "#10" after string creation. So everytime i click register it checks the inputs and says: "yes theres is more than 3 characters." But there isnt.
This is the check code.
Code:
input_check = str_len(id_input); if(input_check > 2) { // Write ID Data } else { error("ID need at least 3 characters."); }
If i create my strings with this one: ""
I just have one character to type in with inkey.
Now how can i manage it that my strings are all 1 character long as long as there is no inkey input?