Railway Motor Car

by S3bulon

Adds a railway motor car as an equipment to ride the railway without placing a locomotive manually.

Content
29 days ago
1.0 - 2.0
12.1K
Trains

b Crash server on water railway

2 years ago

So I think this was caused by me trying to jump back into my vehicle while on top of rail on top of water.
I was checking the space exploration navigation satellite and was thrown out of my car ontop of our railway bridge, when trying to jump back into the car to continue the game crashed 😄
Specifically we are using this mod https://mods.factorio.com/mod/beautiful_bridge_railway_Cargoships

4568.834 Error MainLoop.cpp:1284: Exception at tick 34442169: The mod Railway Motor Car (0.3.8) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event railway-motor-car::railway-motor-car-key (ID 250)
'position': table expected, got nil
stack traceback:
        [C]: in function 'teleport'
        __railway-motor-car__/scripts/use_equipment.lua:97: in function 'mount'
        __railway-motor-car__/scripts/use_equipment.lua:133: in function <__railway-motor-car__/scripts/use_equipment.lua:123>
4568.834 Error ServerMultiplayerManager.cpp:92: MultiplayerManager failed: "The mod Railway Motor Car (0.3.8) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event railway-motor-car::railway-motor-car-key (ID 250)
'position': table expected, got nil
stack traceback:
        [C]: in function 'teleport'
        __railway-motor-car__/scripts/use_equipment.lua:97: in function 'mount'
        __railway-motor-car__/scripts/use_equipment.lua:133: in function <__railway-motor-car__/scripts/use_equipment.lua:123>"
4568.834 Info ServerMultiplayerManager.cpp:795: updateTick(34442169) changing state from(InGame) to(Failed)
4568.834 Quitting: multiplayer error.
2 years ago

This was an ... interesting issue ...

The player was kicked from the motor car due to missing compatibility and placed on the bridge.
But the bridge does not allow walking, thus re-entering the motor car was not possible. And since I did not anticipate the player being at a position where he cannot walk, the mod crashed.

It is fixed with 0.3.9, but now the player is stuck on the bridge.
The player is not kicked by using the SE remote view anymore, but he may be kicked on disconnecting from the server.
Thus better inform the author of the bridge-mod if the stuck-issue can be solved in that mod. My mod may not be the only mod which places the player on top of the bridge.

2 years ago

Thanks a lot for the fixes, they both work great from my test!
Really appreciate not being thrown out when using the remote view!

New response