kevenvz Posted September 3, 2013 Posted September 3, 2013 Hello, I got a problem I am working on a Language chat. Everything works but I want that you are limited to a few available languages. This all works but I want that if you do /lang you see the available languages now I got a problem. If you look at my code you would know what the problem is: local languages = {"English","Dutch","Test"} for _,l in ipairs(languages) do langs = langs + ", " + l end outputChatBox("Avaible languages: "..langs,player,255,0,0,true) Thank you!
Moderators IIYAMA Posted September 3, 2013 Moderators Posted September 3, 2013 langs = langs .. ", " .. l Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Moderators IIYAMA Posted September 3, 2013 Moderators Posted September 3, 2013 np. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Sasu Posted September 3, 2013 Posted September 3, 2013 Another easy way is using table.concat : local languages = {"English","Dutch","Test"} outputChatBox(table.concat(languages, ", "), player, 255, 0,0, true) State: Inactive
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