Migration help
Posted: Mon Feb 04, 2019 8:32 am
Hey all,
I'm trying to figure out how to trigger a function in control.lua from migration (or, alternatively, via on_load or on_init) but nothing seems to work. The function iterates through a global table and replaces entities based on research done. I've put in print commands to try and debug, but they don't seem to be popping up and the entities do not appear to have been replaced.
If I try to put the contents of the function directly into my migration lua file, then I get a bad argument error ('pairs' (table expected, got nil)) on the line where I start a for loop.
If I try to set a global boolean and check it elsewhere, or try to call the function, nothing happens.
Any help would be appreciated!
I'm trying to figure out how to trigger a function in control.lua from migration (or, alternatively, via on_load or on_init) but nothing seems to work. The function iterates through a global table and replaces entities based on research done. I've put in print commands to try and debug, but they don't seem to be popping up and the entities do not appear to have been replaced.
If I try to put the contents of the function directly into my migration lua file, then I get a bad argument error ('pairs' (table expected, got nil)) on the line where I start a for loop.
If I try to set a global boolean and check it elsewhere, or try to call the function, nothing happens.
Any help would be appreciated!