Dzemous Posted July 15, 2017 Share Posted July 15, 2017 Hello! I doing script Panel register and Login. How can I check the length text in editbox? I used: if #GUIREGISTER.Places_R_Register[1] > 0 and #GUIREGISTER.Places_R_Register[1] <=20 then , but this is bad. DB3: Attemp to get length of field '?' (a userdata value) I haven't got idea how to do Link to comment
Gordon_G Posted July 15, 2017 Share Posted July 15, 2017 the '#' only can be used to get the lenght of a table. To get the lenght of the edit you can use : string.len( guiGetText( The_Edit_Box ) ) 1 Link to comment
MIKI785 Posted July 15, 2017 Share Posted July 15, 2017 31 minutes ago, Gordon_G said: the '#' only can be used to get the lenght of a table. To get the lenght of the edit you can use : string.len( guiGetText( The_Edit_Box ) ) Not true, # can be used to get the length of a string as well. So #guiGetText(editBox) should be good enough. But either way it works the same way.. you got an error because you were trying to get the length of the edit box itself (userdata value). 3 Link to comment
Gordon_G Posted July 16, 2017 Share Posted July 16, 2017 @MIKI785 i did'nt know '#' could be used to get lenght of a given string, thank you ! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now