Railway Tunnel (Alpha)


A railway tunnel so trains can cross under each other. An ALPHA release to demonstrate the concepts and completed functionality so far.

Content
2 years ago
1.1
2.01K
Transportation

b [Unsupported] Modded train carriage causes crash

2 years ago

Hello, I got this error while an automatic train tried to go into the tunnel. It's a 2-4 train with the mod Electric Train.

The mod Railway Tunnel (0.0.8) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event railway_tunnel::on_entity_died (ID 4)
railway_tunnel/scripts/tunnel.lua:412: attempt to perform arithmetic on field '?' (a nil value)
stack traceback:
railway_tunnel/scripts/tunnel.lua:412: in function 'CanTrainFitInTunnel'
railway_tunnel/scripts/portal.lua:1263: in function 'OnPortalEntryTrainDetectorEntityDied'
railway_tunnel/scripts/tunnel-shared.lua:442: in function 'handlerFunction'
railway_tunnel/utility/events.lua:158: in function <railway_tunnel/utility/events.lua:151>

2 years ago
(updated 2 years ago)

Can you confirm the specific electric train mod (Mod Portal Link) you used when hitting this issue. So I can log it.

I can't recall what exactly is still hard coded in the mod in this Alpha release around train carriage support. But the readme (description) of the mod does include the below, so this may just be un-supported.

Mod Compatibility
At present the mod isn't tested or supported with any mods that add custom train carriages

2 years ago
(updated 2 years ago)

thanks.
yup this error is due to me not being able to get train carriage lengths via the API as its a missing feature:
https://forums.factorio.com/viewtopic.php?p=498501

I will look at adding a simple clearer error message however quickly.