I’m gaining this error on a module containing some level data, bring about a bunch of various other errors in the script that needs it:

ERROR:SCRIPT: /zones/test_level/test_level.lua:3: effort to table of contents a nil valuestack traceback:/zones/test_level/test_level.lua:3: in key chunk: in role "require"/sonic/sonic#.script:104: in function The weird thing is that this module worked perfectly fine before, and I haven’t touched it in some time. Over there aren’t any type of other errors above it in the console, so i can’t call why this is happening. This is the module code:

local M = M<1><0> = 16M<1><1> = 16M<1><2> = 16M<1><3> = 16M<1><4> = 16M<1><5> = 16M<1><6> = 16M<1><7> = 16M<1><8> = 16M<1><9> = 16M<1><10> = 16M<1><11> = 16M<1><12> = 16M<1><13> = 16M<1><14> = 16M<1><15> = 16M<1><"ang"> = 0return M

You are watching: Lua attempt to index a nil value

I discover it even an ext weird that you say it operated in the first place.

You are creating a table and also putting it in MM = But climate the table consists of nothing (nil) for this reason trying to index one more table within that table is impossible as it hasnt been created.M<1> = nil

topbraj on Discord acquired the answer very first


Not really certain why you space doing a multiple array in the very first place for this module…There is a Discord server?


Just a question about the error message, yet I guess that is much more regarding Lua than rwcchristchurchappeal.com, yet maybe: deserve to it point out automatically which worth actually is make the efforts to be indexed, but is nil?

See more: Why Does My Radiator Fan Turns On When Car Starts, Cooling Fan Starts Too Late

Not certain which function to override, however it sound choose a situation where you’d choose to monkey patch a function, and printout your own information.

I typical a basic use-case because that debugging such blog post is indeed printing the end the values, however I dreamed about it to it is in done because that me in this log

because, girlfriend know, periodically I have in top top line: if table1 and also table2 and table3 and also so on in one line and is taking sooooo much time to print them every
jk i don’t think yes sir monkey patch solution for conditions, right?