Tw1xee Posted October 5, 2015 Share Posted October 5, 2015 I have one question about LUA strings. In sa-mp client scripters can use tab params in strings with '/t', but i haven't this in LUA. How i can do this? string.gsub(stringVar, '/t', ' ') my example isn't good, pls ask me your ideas about this. Sorry for my bad English! My native language isn't English, so I have some mistakes, but I think you'll understand me) Link to comment
KariiiM Posted October 5, 2015 Share Posted October 5, 2015 What are you trying to make? which character you want to remove Link to comment
Tw1xee Posted October 5, 2015 Author Share Posted October 5, 2015 i want make this (example): local tempStr = "Firstname: \t\t" .. anyoneStringWithFirstname tempStr = tempStr .. "\nLastname: \t\t" .. anyoneStringWithLastname --prints: Firstname: testname1 -- LastName: testname2 (newline) but i get one space char in string result (without horizon tabs): Firstname: testname1 Lastname: testname2 Link to comment
Walid Posted October 5, 2015 Share Posted October 5, 2015 check my tut here : LUA Strings Link to comment
KariiiM Posted October 5, 2015 Share Posted October 5, 2015 check my tut here : LUA Strings You don't have the horizontal tab In your tutorial You mean the result become like that,it look like a one space between them? Firstname: testname1 Lastname: testname2 If yes, you have nothing to change with them, F Capital is not like L Capital so here's where the different exist Example to see it more clear, Firstname: testname1 Firstname: testname1 Lastname: testname2 Lastname: testname2 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