The Ruins Mod 2.0 deprecated


This mod is now deprecated and merged with `AbandonedRuins_updated_fork`.

Content
a month ago
2.0
3.15K
Environment

b [FIXED] spawning.lua:38: attempt to index global 'data' (a nil value)

6 months ago

The mod The Ruins Mod 2.0 (1.1.10) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event AbandonedRuins20::on_tick (ID 0)
AbandonedRuins20/lua/spawning.lua:38: attempt to index global 'data' (a nil value)
stack traceback:
AbandonedRuins20/lua/spawning.lua:38: in function 'spawn_entity'
AbandonedRuins20/lua/spawning.lua:94: in function 'spawn_entities'
AbandonedRuins20/lua/spawning.lua:172: in function 'spawn_ruin'
AbandonedRuins20/lua/spawning.lua:184: in function 'spawn_random_ruin'
AbandonedRuins20/control.lua:58: in function <AbandonedRuins20/control.lua:53>

6 months ago

Seem to have the same issue

The mod The Ruins Mod 2.0 (1.1.12) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event AbandonedRuins20::on_tick (ID 0)
__AbandonedRuins20__/lua/spawning.lua:38: attempt to index global 'data' (a nil value)
stack traceback:
    __AbandonedRuins20__/lua/spawning.lua:38: in function 'spawn_entity'
    __AbandonedRuins20__/lua/spawning.lua:98: in function 'spawn_entities'
    __AbandonedRuins20__/lua/spawning.lua:176: in function 'spawn_ruin'
    __AbandonedRuins20__/lua/spawning.lua:188: in function 'spawn_random_ruin'
    __AbandonedRuins20__/control.lua:58: in function <__AbandonedRuins20__/control.lua:53>
6 months ago
(updated 6 months ago)

spawning.lua:38 you can't use data from control.lua Have to replace data.raw.recipe with prototypes.recipe but local prototypes is hiding the global
so in the end you need to replace:
data.raw.recipe[extra_options.recipe]
with:
_G['prototypes'].recipe[extra_options.recipe]

This thread has been locked.