Landfill plus | Breakable landfill, recipe changer and more


Allows the player to break landfill and enable various other landfill related tweaks.

Utilities
2 years ago
1.0 - 1.1
21.8K

b [CRASH] Error while running event Landfill_plus::on_pre_ghost_deconstructed (ID 95)

1 year, 10 months ago

58015.197 Error MainLoop.cpp:1288: Exception at tick 41290595: Мод P.U.M.P. (1.1.3) вызвал неустранимую ошибку.
Пожалуйста, сообщите об этой ошибке автору мода.

Error while running event pump::on_player_selected_area (ID 51)
Мод Landfill plus (1.0.19) вызвал неустранимую ошибку.
Пожалуйста, сообщите об этой ошибке автору мода.

Error while running event Landfill_plus::on_pre_ghost_deconstructed (ID 95)
Landfill_plus/control.lua:324: bad argument #2 of 2 to 'get_player' (string expected, got nil)
stack traceback:
[C]: in function 'get_player'
Landfill_plus/control.lua:324: in function <Landfill_plus/control.lua:322>
stack traceback:
[C]: in function 'order_deconstruction'
pump/constructor.lua:76: in function 'construct_entities'
pump/control.lua:100: in function 'resume_process_selected_area_with_this_mod'
pump/control.lua:64: in function 'process_selected_area_with_this_mod'
pump/control.lua:8: in function <pump/control.lua:6>
58015.197 Error ServerMultiplayerManager.cpp:92: MultiplayerManager failed: "Мод P.U.M.P. (1.1.3) вызвал неустранимую ошибку.
Пожалуйста, сообщите об этой ошибке автору мода.

Error while running event pump::on_player_selected_area (ID 51)
Мод Landfill plus (1.0.19) вызвал неустранимую ошибку.
Пожалуйста, сообщите об этой ошибке автору мода.

Error while running event Landfill_plus::on_pre_ghost_deconstructed (ID 95)
Landfill_plus/control.lua:324: bad argument #2 of 2 to 'get_player' (string expected, got nil)
stack traceback:
[C]: in function 'get_player'
Landfill_plus/control.lua:324: in function <Landfill_plus/control.lua:322>
stack traceback:
[C]: in function 'order_deconstruction'
pump/constructor.lua:76: in function 'construct_entities'
pump/control.lua:100: in function 'resume_process_selected_area_with_this_mod'
pump/control.lua:64: in function 'process_selected_area_with_this_mod'
pump/control.lua:8: in function <pump/control.lua:6>"

https://github.com/Xcone/factorio_pump/issues/13

1 year, 10 months ago

Hi, I'm the author of P.U.M.P. and got linked here via GitHub issue.

Looking at the details in the error, PUMP orders a deconstructions, and landfill picks up on that command, and continues to do something else with it. Which at the very least involves a GetPlayer command, which apparantly needs a name. I assume that's the player name or force?

I pass "player" into the deconstruct command. I also notice something about multiplayer in the details. Maybe that needs something more explicit on my end. I don't remember taking multiplaying into account while making P.U.M.P. (its been a while, though :-o .. )

function construct_entities(construction_plan, surface, toolbox)
    local planned_entities = get_planned_entities(construction_plan, toolbox)
    local player_force = "player"

    for _, entities_to_place in pairs(planned_entities) do
        for i, parameters in pairs(entities_to_place) do
            local entities_to_remove = surface.find_entities(
                                           parameters.deconstruct_area);
            for i, entity in pairs(entities_to_remove) do
                entity.order_deconstruction(player_force) // Line 76 as referred by error details.
            end
        end
    end

 /// etc,..

Eldrinn, have you tried to use P.U.M.P. in the same circumstances, but with Landfill_plus disabled? That would help narrow down if the error has to do with PUMP & multiplayer, or something specific to Landfill_plus

1 year, 10 months ago

Thanks for the quick response.

After writing the ticket, there was a second attempt to apply P.U.M.P. in the same place and the error did not occur.

Here is some additional information:
The error occurred when using geothermal springs on the volcanic planet Space exploration where there is nowhere to apply the landfill.

My guess:
You wrote about GetPlayer as far as I know, to add the possibility of deconstructing landfill, the author of the mod created it so that when there is something on the landfill, it is one type and when there is nothing, it is another and it can be deconstructed. When a player walks along the landfill, he also changes his type and this is visible visually. But as I wrote above there are no places on a volcanic planet where you can place a landfill

Here is the place where the error occurred: https://i.imgur.com/fukKwnj.jpeg

1 year, 10 months ago

Quick response, but not helpful so far, I realize. I just don't know how to help at this point.

I hope the author of Landfill_plus also chimes in to shed some light on their part of the error. If there's a generic way I can avoid placing deconstruction requests that lead up to this error, I'll gladly be adviced about them.

New response