Cargo Ships


Adds massive cargo ships to the game, that function similarly to trains. Also adds tanker ships, train bridges. NOTE: In 2.1, You Must Install Oil Rigs Separately!

Content
11 days ago
0.16 - 2.1
275K
Transportation Logistics Trains Fluids

b Save crashes after a train bridge completes its animation.

6 years ago

Every time a automatic ship actiavtes a train bridge this error appears and crashes to the menu:

The mod Cargo Ships caused a non-recoverable error.
Please report this error to the mod author.

Error while running event cargo-ships::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
cargo-ships/logic/bridge_logic.lua:258: in function 'ManageBridges'
cargo-ships/control.lua:358: in function <cargo-ships/control.lua:355>
stack traceback:
[C]: in function 'index'
__cargo-ships
/logic/bridge_logic.lua:258: in function 'ManageBridges'
cargo-ships/control.lua:358: in function <cargo-ships/control.lua:355>

It happens right after the bridge finishes its opening animation.
If need be I can get the mod list I'm useing.

6 years ago

sry for the late reply
do you by any chance have a save file with this happening?

6 years ago

in version 0.0.50 I get this bug as well:

Error while running event cargo-ships::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
cargo-ships/logic/bridge_logic.lua:287: in function 'ManageBridges'
cargo-ships/control.lua:361: in function <cargo-ships/control.lua:358>
stack traceback:
[C]: in function 'index'
__cargo-ships
/logic/bridge_logic.lua:287: in function 'ManageBridges'
cargo-ships/control.lua:361: in function <cargo-ships/control.lua:358>

when every slave is checked for validity before, then it seems to work but bridge doesn't close.
i guess this bug happens when either rail or water way directly connected to bridge gets destroyed after building the bridge.

6 years ago

adding at line 282: local valid = true for i = 4,9 do valid = valid and entry[i].valid end
and changing die following if block to start with: if valid and ( ...
did the trick for me.

6 years ago

okay, thanks for the report, i will look into it soonish

6 years ago

i added your validation check to the current release. in the long run it probably makes sense to remove and replace bridges for which the validation check fails, i didnt get to that though.

6 years ago

Hello, also having this exact same issue, can't use bridges at all:

The mod Cargo Ships caused a non-recoverable error.
Please report this error to the mod author.

Error while running event cargo-ships::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
cargo-ships/logic/bridge_logic.lua:282: in function 'ManageBridges'
cargo-ships/control.lua:361: in function <cargo-ships/control.lua:358>
stack traceback:
[C]: in function 'index'
__cargo-ships
/logic/bridge_logic.lua:282: in function 'ManageBridges'
cargo-ships/control.lua:361: in function <cargo-ships/control.lua:358>

6 years ago

Getting also a crash with bridges:
1. I cant place a bridge next to rail (no valid position), so i decide to try it with a blueprint
2. put a ghost next to a rail -> valid position
3.: crash (other message than above, but i think it fit here good enoug)
4. Other Mods: Angel, Bob, LTN, 0.18.experimental

The mod Cargo Ships (0.0.51) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event cargo-ships::on_robot_built_entity (ID 14)
cargo-ships/logic/bridge_logic.lua:23: bad argument #3 of 3 to 'index' (string expected, got nil)
stack traceback:
[C]: in function '__index'
__cargo-ships
/logic/bridge_logic.lua:23: in function 'CreateBridge'
cargo-ships/control.lua:55: in function <cargo-ships/control.lua:13>

6 years ago

oh nice, lets see how many crashes i can get :D
1. Get a bridge place and add some landfill under it:
The mod Cargo Ships (0.0.51) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event cargo-ships::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
cargo-ships/logic/bridge_logic.lua:275: in function 'ManageBridges'
cargo-ships/control.lua:364: in function <cargo-ships/control.lua:361>
stack traceback:
[C]: in function 'index'
__cargo-ships
/logic/bridge_logic.lua:275: in function 'ManageBridges'
cargo-ships/control.lua:364: in function <cargo-ships/control.lua:361>

6 years ago

I am experiencing the same problem - change log says crashes were fixed, but the mod still crashes :(

New response