Nanobots 2.0 v3.3.1 throwing numerous errors
Posted: Sat Jan 18, 2025 7:25 pm
				
				This mod does not appear to be maintained at this point - or the maintainer is too busy for it, which I totally understand.
However, the mod is a massive QoL upgrade for me and I'm not sure I could play the game without it... and yet, there are several problems with the current version of it (itself a fork to update the mod for Space Age). With these constant errors spamming the message block (especially the second one, which doesn't stop spamming), I've had to turn off the mods, which is... not great. At least Error 1 only comes up every five minutes or so. Anyone have any ideas?
Error 1:
Error 2:
			However, the mod is a massive QoL upgrade for me and I'm not sure I could play the game without it... and yet, there are several problems with the current version of it (itself a fork to update the mod for Space Age). With these constant errors spamming the message block (especially the second one, which doesn't stop spamming), I've had to turn off the mods, which is... not great. At least Error 1 only comes up every five minutes or so. Anyone have any ideas?
Error 1:
From core.lua (lines 40-51):Script @stdlib2/stdlib/core.lua:45: Nanobots2:LuaConstantCombinatorControlBehavior doesn't contain key parameters.
Code: Select all
--- Prints and logs the msg
-- @tparam string msg
-- @treturn boolean true if the message was printed to someone
function Core.log_and_print(msg)
if game and #game.connected_players > 0 then
log(script.mod_name .. ':' .. msg)
game.print(msg)
return true
else
log(msg)
end
endRelevant code (I think?):attempt to index local 'prototype' (a nil value)
Code: Select all
local _find_item = function(simple_stack, _, player, at_least_one)
    local item, count = simple_stack.name, simple_stack.count
    count = at_least_one and 1 or count
    local prototype = prototypes.item[item]
    if prototype.type ~= 'item-with-inventory' then
        if player.cheat_mode or player.get_item_count(item) >= count then
            return true
        else
            local vehicle = player.vehicle
            local train = vehicle and vehicle.train --- @type LuaTrain
            return vehicle and ((vehicle.get_item_count(item) >= count) or (train and train.get_item_count(item) >= count))
        end
    end
end