RailPowerSystem

by Hermios

Connect rails to electric and signals circuits, and use electric trains

Content
2 months ago
0.14 - 1.1
836
Transportation

b Attempt to remote call outside of an event

7 years ago
(updated 7 years ago)

When i load a saved game with railpowersystem enabled in 0.15.27 i get this error message:
Attempt to remote call outside of an event.
stack traceback:
RailPowerSystem/control.lua:8: in main chunk

7 years ago

The problem is still there

7 years ago

Looks like this is due to: "Fixed that mods could do remote calls outside of events when the game isn't in a valid state." -- https://forums.factorio.com/viewtopic.php?t=50509

Rampant had the same problem and fixed it by moving the event hook from global scope to onInit() and onLoad(): https://github.com/veden/Rampant/commit/839329bdac9ed069ec8b8941599a396e77d96780

7 years ago

I've changed control.lua to https://gist.github.com/Thynix/9d9036b36bc30a6bfcba2ccbdac21a4f and it works for me so far. I moved the FARL add_entity_to_trigger calls to the function called on load and init.

7 years ago

Great, that fixed it for me too! Thanks!

7 years ago

This is fixed in RailPowerSystem 0.1.4. Thanks!

New response