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 }
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.
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 }
callum123 Posted September 28, 2012 Author Posted September 28, 2012 Ahh, I see thank you both for your help.
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