RailPowerSystem

by Hermios

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

Content
10 days ago
0.14 - 1.1
446
Transportation

b Attempt to remote call outside of an event

6 years ago
(updated 6 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

6 years ago

The problem is still there

6 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

6 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.

6 years ago

Great, that fixed it for me too! Thanks!

6 years ago

This is fixed in RailPowerSystem 0.1.4. Thanks!

New response