K4stic Posted May 5, 2014 Share Posted May 5, 2014 i Found a Bug Dunno how Solve it i will give example: like i have an Account with Name "DUDE123" and another Player can register with same account Name but with small letter like "dude123" how solve that? P.S The Big Problem is that they Got the Same Data like ( weapons, Money and etc ) Link to comment
Moderators IIYAMA Posted May 5, 2014 Moderators Share Posted May 5, 2014 No they don't have. Unless you use something else then a default database. Link to comment
K4stic Posted May 5, 2014 Author Share Posted May 5, 2014 anyway how i can solve this? because i use onPlayerLogin get account data set elementdata and etc and as i was say before they little fail Link to comment
tosfera Posted May 5, 2014 Share Posted May 5, 2014 easy, whenever you do addAccount, make sure you make all the characters lowercase. In that way they won't be able to register a name twice. Link to comment
K4stic Posted May 5, 2014 Author Share Posted May 5, 2014 i mean any way to check? to Prevent that like if i have an account "DUDE123" to can't register another with same but lowcase letters or the negativ if i have account dude123 to can't create another as DUDE123 Link to comment
Controlled Posted May 5, 2014 Share Posted May 5, 2014 You can use s:lower() to force all the characters to be lowercase then check if the account exists. local username = "HELLO123" local username = string.lower(username) username would return "hello123" after those operations were complete. Link to comment
K4stic Posted May 6, 2014 Author Share Posted May 6, 2014 i have Question i found the follow think: Find the first occurrence of the pattern in the string passed. If an instance of the pattern is found a pair of values representing the start and end of the string is returned. If the pattern cannot be found nil is returned. > = string.find("Hello Lua user", "Lua") 7 9 > = string.find("Hello Lua user", "banana") nil can i use it? Link to comment
Gallardo9944 Posted May 7, 2014 Share Posted May 7, 2014 what for? You'll have to use string.lower anyway. Link to comment
K4stic Posted May 7, 2014 Author Share Posted May 7, 2014 aaa ok Thx sorry just i bad know string. functions 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