How do I ... Check last character in TextBox [solved]

Get help using Construct 2

Post » Sun Oct 19, 2014 4:06 pm

Hi, I have a question. I'm asking because I have leaderboards in my game and posting doesn't work if last character in username is space (" "). :(
The question is: How can I check the last character in textbox?
Last edited by grigrizljac on Mon Oct 20, 2014 5:20 pm, edited 1 time in total.
B
32
S
7
G
4
Posts: 403
Reputation: 4,606

Post » Sun Oct 19, 2014 7:48 pm

From the system expressions manual page.
https://www.scirra.com/manual/126/system-expressions
right(text, count)
Return the last count characters of text.


Use that with a system compare condition with right(EditBox.Text, 1) = " "
B
95
S
33
G
128
Posts: 5,491
Reputation: 81,570

Post » Mon Oct 20, 2014 2:07 pm

Message: grigrizljac can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
R0J0hound wrote:From the system expressions manual page.
https://www.scirra.com/manual/126/system-expressions
right(text, count)
Return the last count characters of text.


Use that with a system compare condition with right(EditBox.Text, 1) = " "

Thank you very much! It works :)
B
32
S
7
G
4
Posts: 403
Reputation: 4,606


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 18 guests