FlyingSpoon Posted July 30, 2017 Share Posted July 30, 2017 local unlockable = { {"Well done noob.", 1}, {"You are awesome.", 2} } function gogo() for i, v in pairs(unlockable) do outputChatBox("Unlocked: "..v[1][1], player) end end addCommandHandler("output", gogo) I want it to only output "Well done noob", but it says a nil value. Link to comment
MisterQuestions Posted July 30, 2017 Share Posted July 30, 2017 You don't need to loop if you want to access it directly using: unlockable[1] refers to '{"Well done noob.", 1}' using: unlockable[1][1] refers to "Well done noob." Link to comment
FlyingSpoon Posted July 30, 2017 Author Share Posted July 30, 2017 (edited) I tried it, didn't work EDIT: Never mind works again Edited July 30, 2017 by raysmta 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