Abandoned Ruins - Updated (core)

by Keysivi

This mod doesn't do anything by itself. You need to install ruin-set mods or no ruin will be spawned. It then can spawn randomly choosen ruins in the world. These ruins are destroyed fragments of bases, forts, small oases, and more. (Now co-authored with roland77)

Content
9 days ago
2.0
8.34K

b [INVALID] Crash on init: Require can't be used outside of control.lua parsing

a month ago
(updated a month ago)

Hi! I encountered a crash when initializing the mod. Here is the error message:

Error while running event AbandonedRuins-Combined::on_init()
AbandonedRuins-Combined/control.lua:12: Require can't be used outside of control.lua parsing.
stack traceback:
[C]: in function 'require'
AbandonedRuins-Combined/control.lua:12: in function 'build_ruin_set'
AbandonedRuins-Combined/control.lua:25: in function <AbandonedRuins-Combined/control.lua:16>

In Factorio, the require function cannot be called dynamically inside runtime events like on_init(). It must only be used during the initial file parsing stage.

To fix this, please move the require statement from line 12 inside build_ruin_set to the very top of the control.lua file, outside of any functions or event handlers.Thank you for maintaining this mod!

Sorry, I posted about the error under the wrong mod. Please delete this post later.

a month ago
(updated 9 days ago)

AbandonedRuins-Combined <-- Yes, that is not this mod. Don't worry, no problem. Topic is getting locked and marked invalid (wrong mod).

EDIT: I was actually wondering where this error is coming from. But it is now clear.

This thread has been locked.