Train tunnels

by Godmave

Tunnels for trains

Content
4 years ago
0.17 - 1.1
13.9K
Trains

b Crash

4 years ago

Crash massage:
Error while running event traintunnels::on_train_changed_state (ID 23)
traintunnels/control.lua:1137: bad argument #1 of 5 to 'find' (string expected, got nil)
stack traceback:
[C]: in function 'find'
traintunnels/control.lua:1137: in function <traintunnels/control.lua:1080>

4 years ago

Same here

4 years ago
(updated 4 years ago)

Updated to version 0.0.10.

Trains don't seem to route through the tunnel. Manually driving a train into the tunnel crashes the game:

The mod Train tunnels (0.0.10) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event traintunnels::on_tick (ID 0)
LuaEntity belongs to surface nauvis (index 1) but a LuaEntity belonging to surface underground_1 (index 3) was expected.
stack traceback:
traintunnels/teleport.lua:306: in function 'teleportCarriage'
traintunnels/control.lua:881: in function <traintunnels/control.lua:661>
stack traceback:
[C]: in function 'newindex'
__traintunnels
/teleport.lua:306: in function 'teleportCarriage'
traintunnels/control.lua:881: in function <traintunnels/control.lua:661>

4 years ago

Can't reproduce this. I tried with existing maps and with a new map. Both work.
If you can provide a link to your save I can take a look at it.

4 years ago

I had a similar issue as well:
The mod Train tunnels (0.0.10) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event traintunnels::on_tick (ID 0)
LuaEntity belongs to surface nauvis (index 1) but a LuaEntity belonging to surface underground_1 (index 2) was expected.
stack traceback:
traintunnels/teleport.lua:306: in function 'teleportCarriage'
traintunnels/control.lua:881: in function <traintunnels/control.lua:661>
stack traceback:
[C]: in function 'newindex'
__traintunnels
/teleport.lua:306: in function 'teleportCarriage'
traintunnels/control.lua:881: in function <traintunnels/control.lua:661>

4 years ago

What's a good way to share my save?

4 years ago

Testing out different things I think it's tied to the speed of the game. I can run the train through 50-100 times then it'll randomly trigger this error. If i make the train wait 1 sec before going through after a crash, it works fine for a while again.

4 years ago

Googledrive share or similiar. If it is smaller than 100mb in size you can send it to me in factorio discord: Godmave#7432

4 years ago

I sent a save on discord. just turn the train on and you'll see an error come up.

3 years ago

Seems to get this error when a client enters the tunnel, based on the error it does seem to be similar.

The mod Train tunnels (0.0.11) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event traintunnels::on_tick (ID 0)
LuaEntity belongs to surface nauvis (index 1) but a LuaEntity belonging to surface underground_1 (index 11) was expected.
stack traceback:
[C]: in function 'newindex'
__traintunnels
/teleport.lua:314: in function 'teleportCarriage'
traintunnels/control.lua:881: in function <traintunnels/control.lua:661>

New response