fairyoggy Posted August 17, 2019 Share Posted August 17, 2019 Hello! How do I check for a character in edits? I mean, need to check if there is a sign "@" in this edit or no Example: type in edit "hello" - appear message - invalid type in edit "hello@" - appear message - complete Link to comment
Kenix Posted August 17, 2019 Share Posted August 17, 2019 (edited) local text = guiGetText( yourGuiElement ); if ( text:find( "@" ) ) then outputChatBox( "contains @" ); else outputChatBox( "contains none " ); end Also you can use pregMatch functions. UPD: http://Lua-users.org/wiki/PatternsTutorialhttp://www.Lua.org/manual/5.1/manual.html#5.4.1 Edited August 17, 2019 by Kenix 1 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