Asteroid Mining

by Silari

Allows sending rockets into space to mine for asteroid bits, which can be refined into raw materials for infinite ores. Includes all 5 vanilla ores, plus Bob's Ores and Angel's support. Now with partial Krastorio 2 support. Advanced Mode (in beta) allows generating resource patches for mining using gathered materials, with rates based on the ore generation settings of the surface. Support for multiple surfaces is included, along with Space Exploration support.

Content
6 months ago
1.0 - 1.1
15.6K
Mining

b non-recoverable error

1 year, 7 months ago

Hey I try to launch server and I get this message, the crazy things was in solo I dont have any problem I can invite friends too.

any Ideas?

78.827 Error ServerMultiplayerManager.cpp:92: MultiplayerManager failed: "The mod Asteroid Mining (0.9.10) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Asteroid_Mining::on_init()
Error when running interface function space-exploration.get_surface_type: space-exploration/scripts/ancient.lua:1008: bad argument #1 of 2 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
space-exploration/scripts/ancient.lua:1008: in function 'vault_from_surface'
space-exploration/scripts/remote-interface.lua:136: in function <space-exploration/scripts/remote-interface.lua:131>
stack traceback:
[C]: in function 'call'
Asteroid_Mining/scripts/advanced/adv-mining.lua:215: in function 'check_surface'
Asteroid_Mining/scripts/advanced/adv-mining.lua:375: in function 'init_mining'
Asteroid_Mining/scripts/advanced/adv-mining.lua:390: in function <Asteroid_Mining/scripts/advanced/adv-mining.lua:389>"
78.827 Info ServerMultiplayerManager.cpp:795: updateTick(4294967295) changing state from(CreatingGame) to(InitializationFailed)
78.827 Info CommandLineMultiplayer.cpp:216: Exit point.

1 year, 7 months ago

Looks like it might be an error in Space Exploration. I call a remote interface to check what kind of surface something is when created, and something in there isn’t working right. I’ll check when I get home if I’m maybe sending some bad info to the interface. Otherwise this is something on their side.

Are you using SE 0.6? Most of my testing was done with 0.5 so also possible there’s something weird going on there.

1 year, 7 months ago

Okay thanks, Yep I use on SE 0.6.86

1 year, 7 months ago

I can not reproduce this and I don't see any way I could be causing this. init_mining just iterates over the game's surfaces, calls check_surface with the names given by the API, then calls SEs remote interface to check the type of that surface using the index number of the surface.

The name can't be invalid and the surface has to exist or else it'd error when I attempt to find the index, which it does right before the call to SE's remote interface. No changes between 0.5 and 0.6 for the interface. Looking at the SE code, it's validating the surface before it does anything, which removes the last possible way I could think that my code was causing this.

It looks like one of their global values hasn't been initialized yet so it's nil, which the code tries to iterate over using pairs, causing the error. It's possible the dev didn't account for someone using that interface during on_init when the game is first created.

Really makes no sense that SP/hosted MP would be fine and starting a server wouldn't, but ultimately it's something in the SE code that is failing.

1 year, 7 months ago

okay thanks to your fast reply, and sorry to bother with that error

New response