Forums » Community Projects
lua error with catalog 1.4
Hi Rin,
I've got this new error when game is loading catalog plugin
plugins/catalog/db.lua:9: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
in function 'pairs'
plugins/catalog/db.lua:9: in function 'for_all_item'
plugins/catalog/db.lua:9: in function 'count_items'
plugins/catalog/db.lua:9: in function 'load'
plugins/catalog/db.lua:9: in function 'insert_item_from_inventory'
plugins/catalog/db.lua:9: in function 'insert_items_from_inventory'
plugins/catalog/db.lua:9: in function <plugins/catalog/main.lua:47>
great plugin btw ;-)
I've got this new error when game is loading catalog plugin
plugins/catalog/db.lua:9: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
in function 'pairs'
plugins/catalog/db.lua:9: in function 'for_all_item'
plugins/catalog/db.lua:9: in function 'count_items'
plugins/catalog/db.lua:9: in function 'load'
plugins/catalog/db.lua:9: in function 'insert_item_from_inventory'
plugins/catalog/db.lua:9: in function 'insert_items_from_inventory'
plugins/catalog/db.lua:9: in function <plugins/catalog/main.lua:47>
great plugin btw ;-)
Huh. So that is caused by cat.db.data being nil, but I don't know how it became nil. That should never happen; it should always be at least an empty table. I'll include a safeguard for that in 1.5 if I can't figure out what actually went wrong.
Do you experience this bug regularly, or was this the only time?
Do you experience this bug regularly, or was this the only time?
It was working fine. I moved settings files from one computer to another and back then. Might be what had triggered it.