JeViCo Posted April 29, 2018 Share Posted April 29, 2018 Hello everyone! I have a little problem: mystring = "somE teXt" mystring = mystring:lower() outputChatBox(mystring) i get in chat somE teXt so string.lower function doesn't work for me. Help me please Link to comment
DNL291 Posted April 29, 2018 Share Posted April 29, 2018 (edited) > mystring = "somE teXt" mystring = mystring:lower() print(mystring) some text Your code is fine, the chat should display everything lowercase. You've probably made a mistake in your code. Edited April 29, 2018 by DNL291 Link to comment
JeViCo Posted April 29, 2018 Author Share Posted April 29, 2018 2 hours ago, DNL291 said: > mystring = "somE teXt" mystring = mystring:lower() print(mystring) some text Your code is fine, the chat should display everything lowercase. You've probably made a mistake in your code. my part of code: addCommandHandler("check",function(cmd, stre, stre2, value) if (stre and stre2 and value) then stre = stre:lower() print("stre = "..stre) stre2 = stre2:upper() print("stre2 = "..stre2) end end) it doesn't work here Link to comment
DNL291 Posted April 29, 2018 Share Posted April 29, 2018 Note: You cannot use "check", "list" or "test" as a command name. Link to comment
JeViCo Posted April 30, 2018 Author Share Posted April 30, 2018 11 hours ago, DNL291 said: Note: You cannot use "check", "list" or "test" as a command name. Ok, but i replaced it with detail command and keep getting the same resul :\ Link to comment
Master_MTA Posted May 1, 2018 Share Posted May 1, 2018 (edited) 16 hours ago, Juuve said: Ok, but i replaced it with detail command and keep getting the same resul :\ try to use another formula addCommandHandler("mycmd",function(cmd, stre, stre2, value) if (stre and stre2 and value) then print("stre = "..(string.lower(stre))) print("stre2 = "..(string.upper(stre2))) end end) is it work? Edited May 1, 2018 by Master_MTA 1 Link to comment
JeViCo Posted May 1, 2018 Author Share Posted May 1, 2018 8 hours ago, Master_MTA said: try to use another formula addCommandHandler("mycmd",function(cmd, stre, stre2, value) if (stre and stre2 and value) then print("stre = "..(string.lower(stre))) print("stre2 = "..(string.upper(stre2))) end end) is it work? Thank you! It works! I can't understand why it didn't work before. Maybe i wrote a formula wrong 1 Link to comment
Master_MTA Posted May 1, 2018 Share Posted May 1, 2018 2 hours ago, Juuve said: Thank you! It works! you are welcome Link to comment
Administrators Lpsd Posted May 1, 2018 Administrators Share Posted May 1, 2018 Well it looks like you didn't enable OOP in the meta.xml, using <oop>true</oop> 1 Link to comment
JeViCo Posted May 1, 2018 Author Share Posted May 1, 2018 1 hour ago, LopSided_ said: Well it looks like you didn't enable OOP in the meta.xml, using <oop>true</oop> yeah, i guess the problem was here) 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