Inserter Configuration


More control over inserters. Adjust pickup and drop locations using a gui and various hotkeys. Adds 90 degree inserters.

Utilities
3 days ago
1.1 - 2.0
16.9K
Logistics

b NaN encountered when inside Factorissimo factory and picking up items on floor while placing inserter

2 years ago
(updated 2 years ago)
41329.810 Error MainLoop.cpp:1284: Exception at tick 917798: The mod Inserter Configuration (1.0.0) caused a non-recoverable error.

Please report this error to the mod author.

Error while running event Inserter_Config::inserter-config-drop-distance-adjust (ID 274)
real number expected got nan.
stack traceback:
        [C]: in function '__newindex'
        __Inserter_Config__/control.lua:128: in function 'set_arm_positions'
        __Inserter_Config__/control.lua:504: in function <__Inserter_Config__/control.lua:470>
41329.810 Error ServerMultiplayerManager.cpp:91: MultiplayerManager failed: "The mod Inserter Configuration (1.0.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Inserter_Config::inserter-config-drop-distance-adjust (ID 274)
real number expected got nan.
stack traceback:
        [C]: in function '__newindex'
        __Inserter_Config__/control.lua:128: in function 'set_arm_positions'
        __Inserter_Config__/control.lua:504: in function <__Inserter_Config__/control.lua:470>"
41329.810 Info ServerMultiplayerManager.cpp:794: updateTick(917798) changing state from(InGame) to(Failed)
41329.812 Quitting: multiplayer error.
2 years ago

Managed to get it again, outside of a factory this time.

5882.635 Error MainLoop.cpp:1284: Exception at tick 1212521: The mod Inserter Configuration (1.0.0) caused a non-recoverable error.

Please report this error to the mod author.

Error while running event Inserter_Config::inserter-config-drop-distance-adjust (ID 274)
real number expected got nan.
stack traceback:
        [C]: in function '__newindex'
        __Inserter_Config__/control.lua:128: in function 'set_arm_positions'
        __Inserter_Config__/control.lua:504: in function <__Inserter_Config__/control.lua:470>
5882.636 Error ServerMultiplayerManager.cpp:91: MultiplayerManager failed: "The mod Inserter Configuration (1.0.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Inserter_Config::inserter-config-drop-distance-adjust (ID 274)
real number expected got nan.
stack traceback:
        [C]: in function '__newindex'
        __Inserter_Config__/control.lua:128: in function 'set_arm_positions'
        __Inserter_Config__/control.lua:504: in function <__Inserter_Config__/control.lua:470>"
5882.636 Info ServerMultiplayerManager.cpp:794: updateTick(1212521) changing state from(InGame) to(Failed)
5882.648 Quitting: multiplayer error.

Was just ripping up some old factories with miniloaders and some inserters.

2 years ago

Got it a third time, this time just picking up items from a belt while an inserter was nearby.

2 years ago

Figured it out, it's the miniloaders; they are inserters but they have no arms, they give NaNs.

2 years ago
(updated 2 years ago)

Maybe fix it with something like this? This doesn't work afaik but you can debug it by using miniloaders and trying to pick up what they're "holding."

        local new_drop_position = math2d.position.add(new_drop_tile, new_drop_offset)

        if new_drop_position ~= new_drop_position then
            -- drop nans
            return
        end

        inserter.drop_position = new_drop_position
2 years ago

This does appear to fix it though...

        if type(new_drop_position) ~= 'number' or new_drop_position ~= new_drop_position then
            -- drop nans
            return
        else
            inserter.drop_position = new_drop_position
        end
2 years ago
(updated 2 years ago)

Ah but it breaks other stuff - must need to do local new_drop_position = tonumber(math2d.position.add(new_drop_tile, new_drop_offset)) and then the nan check.

2 years ago
        local new_drop_position = math2d.position.add(new_drop_tile, new_drop_offset)

        if new_drop_position.x ~= new_drop_position.x or new_drop_position.y ~= new_drop_position.y then
            return
        end

        inserter.drop_position = new_drop_position

New response