JeViCo Posted April 29, 2018 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
DNL291 Posted April 29, 2018 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
JeViCo Posted April 29, 2018 Author 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
DNL291 Posted April 29, 2018 Posted April 29, 2018 Note: You cannot use "check", "list" or "test" as a command name.
JeViCo Posted April 30, 2018 Author 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 :\
Master_MTA Posted May 1, 2018 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
JeViCo Posted May 1, 2018 Author 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
Master_MTA Posted May 1, 2018 Posted May 1, 2018 2 hours ago, Juuve said: Thank you! It works! you are welcome
Forum Administrators Lpsd Posted May 1, 2018 Forum Administrators Posted May 1, 2018 Well it looks like you didn't enable OOP in the meta.xml, using <oop>true</oop> 1
JeViCo Posted May 1, 2018 Author 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)
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