Page 1 of 1

Error : '}' expected

Posted: Wed Jan 21, 2026 4:00 pm
by Paulquicode
Hi, I'm new to modding, and have this error when loading my mod :
Failed to load mods: __Legotorio__/data-final-fixes.lua:1: __Legotorio__/config.lua:10: '}' expected (to close '{' at line 9) near '='
stack traceback:
[C]: in function 'require'
__Legotorio__/data-final-fixes.lua:1: in main chunk

Here is the content of config.lua :

Code: Select all

return {
	-- lower case resource pack name, same of mod folder name (exclusing version) and "name" in info.json; no double underscores ("__")!
	resource_pack_name = "Legotorio",

	-- let the mod know what you will be retexturing
	data = {
			base = {
				graphics = {
					entity = {
						small-lamp = { 
						["lamp.png"] = { },
						["lamp-light.png"] = { },
						},
					},
				},
			},
		}
	}
Could you help me, please ?

Re: Error : '}' expected

Posted: Wed Jan 21, 2026 5:49 pm
by meifray
You used ";" instead of ",".
It is all inside a teble so you should just use ","

Re: Error : '}' expected

Posted: Wed Jan 21, 2026 8:03 pm
by Paulquicode
I don't see where I made the mistake, can you tell me where is it, please ?

Re: Error : '}' expected

Posted: Fri Jan 23, 2026 8:56 am
by Kyralessa
I don't know Lua, so I could be wrong, but...

https://www.lua.org/manual/5.1/manual.html#2.1
Names (also called identifiers) in Lua can be any string of letters, digits, and underscores, not beginning with a digit.
You appear to be using small-lamp as an identifier, but hyphens - aren't allowed in identifiers.

Re: Error : '}' expected

Posted: Fri Jan 23, 2026 10:30 am
by Paulquicode
I resolved my bug by replacing "small-lamp" with ["small-lamp"] ! Thanks you very much !