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: 398
Reputation: 4,591

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
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

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: 398
Reputation: 4,591


Return to How do I....?

Who is online

Users browsing this forum: dop2000, R0J0hound, StillSarah and 22 guests