callum123 Posted September 28, 2012 Posted September 28, 2012 local hello = { hi = true, hey = true, } I'm trying to do something like this, but then get the error to close the curly braced bracket
manve1 Posted September 28, 2012 Posted September 28, 2012 try this: hello = { hi = true hey = true } Looking for tutorials or information? check out: www.simpleask.co.uk
Anderl Posted September 28, 2012 Posted September 28, 2012 try this: hello = { hi = true hey = true } It's exactly the same. @callum123, it works, I even tested the code to be sure. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
callum123 Posted September 28, 2012 Author Posted September 28, 2012 Tryed that, but still get the error. Let me show you it exactly. Since I am using pictures. Error: lua:2: '}' expected (to close '{' at line 1) near '=' local hello = { 'hi.png' = true, 'hey.png' = true, }
Anderl Posted September 28, 2012 Posted September 28, 2012 Tryed that, but still get the error. Let me show you it exactly. Since I am using pictures.Error: lua:2: '}' expected (to close '{' at line 1) near '=' local hello = { 'hi.png' = true, 'hey.png' = true, } Strings must use [ ], e.g.: local hello = { ['hi.png'] = true, -- this needs [] as it is a string bye = true -- this doesn't need [] as it is a variable } "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
callum123 Posted September 28, 2012 Author Posted September 28, 2012 Ahh, I see thank you both for your help.
Anderl Posted September 28, 2012 Posted September 28, 2012 You're welcome "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
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