Hi guys!
A couple of us at the Candy Crush Saga Wiki are trying to create a set of nested Lua tables to act as a kind of database of level information. According to w:c:dev:Lua_reference_manual, "any value except nil may be stored as a value in a table", therefore it was assumed that tables should be able to be stored within tables. However, after creating a monster set of nested tables in a separate document, I tried to copy it into a module page on CCSW but got a syntax error, specifically:
Script error: Lua error at line 2: '}' expected (to close '{' at line 1) near '='.
However, if I close the table at lines one or two, I won't be able to nest any of the other tables without it resulting in an unreadable mess! Can you please see what's wrong with our approach and how we can fix it? Is the idea of storing data in nested Lua tables fundamentally flawed, or can it be done?
A copy of the tables we want to include can be found at w:c:candycrush:Module talk:LuaDB (I'm not copying it here as my text editor is saying it's over 16,000 lines long. Don't worry, it was generated by a script, not by hand!). You can see the error if you try to copy/paste that table into the parent page of that talk page.