Cant find source of "index a nil value"
I'm trying to fix an addon that broke with Summerset with "index a nil value" errors. The problem I have is I cant figure out where the actual error is in the code.
I get two of them, one is reported on line 221 of GamePadBuddy.lua in function "Main Chunk" and the other is on line 4 of AddonMenu.lua in function " Main Chunk". In the GamePadBuddy file line 221 has a } bracket which is at the end of a table. Code:
GamePadBuddy.defaultAcctSettings = { Code:
GamePadBuddy.AddonMenu = {} |
Pleas epost the whole lua error message you get here including the call stack! Maybe this helps.
Do you get the error message on the GamepadBuddy addon which one can download here at esoui (same version, no changes?) or di you change something already? Did you test it without any other addons? Did you update the libraries used in this addon (if there are any and if they were updated in the past)? |
Quote:
It happens even if this is the only addon enabled. I grabbed a fresh libaddonmenu 2.0 and libstub but that did not help. I figured out that the addon partially works despite the errors. However, the 'addon' menu is not there, presumably due to the error in the AddonMenu.lua file and integration with TTC isn't working. Here is what appears in the log file (and error box ingame): 2018-06-01T13:58:55.916-07:00 |cff0000Lua Error: user:/AddOns/GamePadBuddy/GamePadBuddy.lua:221: attempt to index a nil value stack traceback: user:/AddOns/GamePadBuddy/GamePadBuddy.lua:221: in function '(main chunk)'|r 2018-06-01T13:58:55.917-07:00 |cff0000Lua Error: user:/AddOns/GamePadBuddy/AddonMenu.lua:4: attempt to index a nil value stack traceback: user:/AddOns/GamePadBuddy/AddonMenu.lua:4: in function '(main chunk)'|r 018-06-01T14:13:12.567-07:00 |cff0000Lua Error: user:/AddOns/GamePadBuddy/GamePadBuddy.lua:221: attempt to index a nil value stack traceback: user:/AddOns/GamePadBuddy/GamePadBuddy.lua:221: in function '(main chunk)'|r 2018-06-01T14:13:12.567-07:00 |cff0000Lua Error: user:/AddOns/GamePadBuddy/AddonMenu.lua:4: attempt to index a nil value stack traceback: user:/AddOns/GamePadBuddy/AddonMenu.lua:4: in function '(main chunk)'|r |
Not sure what changed, but I just re-copied a fresh set of files over and now its working. I had installed via Minion originally but this time I just manually copied the files. I don't see anything different in the list of files though.
I've even re enabled all the other addons I have and no error anymore. No clue why the error was there in the first place unless Minion somehow installed an incorrect version of a file, or was missing one. |
This might happen. Just tested it myself and it works fine for me -> no error messages, did not test the addon itsself! (using fresh libAddonmenu and libStub)
|
Just as an answer, those two errors were expecting the variable GamePadBuddy to be a table and it was nil. The indexing operation merely means it was trying to write an entry into a table that didn't exist.
|
Quote:
|
All times are GMT -6. The time now is 07:06 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI