Module Inserter Simplified


Easy-to-use tool for inserting and upgrading modules in machines using construction robots. Use Module Inserter Extended if you want to create detailed configurations per machine type (it is a straight upgrade from Module Inserter). Use Module Inserter Simplified if you want to easily create module requests, one type at a time, without any complex configuration GUI. Can be installed alongside MI Extended if you really want to...

Utilities
a month ago
1.1 - 2.0
131K
Manufacturing

g Table Expected, got nil error

2 months ago

I recently restarted a save that was working previously. I get this error. I think I have base lib 1.1.110. What other info do you need?

The mod Module Inserter Simplified (2.0.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event ModuleInserterSimplified::on_init()
ModuleInserterSimplified/scripts/init-global.lua:57: bad argument #1 of 2 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
ModuleInserterSimplified/scripts/init-global.lua:57: in function 'generate_allowed_in_entity'
ModuleInserterSimplified/scripts/init-global.lua:138: in function 'generate_global_data'
ModuleInserterSimplified/scripts/init-global.lua:185: in function 'on_init'
core/lualib/event_handler.lua:69: in function <core/lualib/event_handler.lua:64>

2 months ago
(updated 2 months ago)

Hey, thanks for the report. It looks like you have a mod which adds a module that has no effects, and MIS fails to allow for that.
To fix, you can modify line 51 to instead say local module_effects = module.module_effects or {}.

I'm not releasing any more updates for 1.1 mods at this point, and Module Inserter Simplified is already ported to 2.0 (with even better functionality!). This error won't occur in 2.0 because that whole section of code has been removed.

2 months ago

Hey, thanks for prompt response and good to know. I know 2.0 is coming and I'm basically reloading the game and mods to prepare for a new save when its available. I figured if this was something that would be good to know (since its a new issue) i would report it. The local mitigation is good info but I probably should just wait till i have 2.0 because I suspect most mods are waiting for this to roll.

Thanks again.

2 months ago

Hmm I'm not sure there's much value in preparing mods for a 2.0 save, in 1.1. The mod API is changing so massively, that even if the mods you select are updated promptly, they will likely change in functionality quite a lot and may even no longer be compatible with each other.

New response