trying to build table, getting 'attempt to index a nil value' error
I'm still getting used to the lua table/key conventions. Here's the code that's causing problems:
Code:
local toonName=GetUnitName("reticleover") Code:
PlayerInfoLogger.Default={ Here's the txt manifest file: Code:
## Title: Genesis PlayerInfoLogger |
Update, I've sort of fixed it. I changed the initialization routine to explicitly default the fullList variable instead of relying on the built in Default table to do it.... but I'd still appreciate any insight into why that didn't work.
Code:
function PlayerInfoLogger:Initialize() |
I think your problem is the default var in the saved variables init method. You have this
Lua Code:
You have already a default table. Can you try to remove the braces around the PlayerInfoLogger.Default var? Lua Code:
You should also delete your saved vars before this change while the game is not running to avoid the loading of old invalid data. |
Code:
{PlayerInfoLogger.Default} e.g. Lua Code:
But for the SavedVariables you need a table with the entries of your SavedVariables, and not a table containing a table (unless your SV needs the subtable :D ). |
Thank you both, that makes total sense.
I'm itching to test it out now but *sigh* zeni is having their own breed of technical difficulties at the moment and i can't login. |
All times are GMT -6. The time now is 09:22 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI