rebel1324 / NutScript

A free role-play framework for Garry's Mod.
http://nutscript.net
MIT License
66 stars 32 forks source link

After adding some addons to the server i am greeted with this. #338

Closed DoubleShot19 closed 3 years ago

DoubleShot19 commented 4 years ago

[ERROR] gamemodes/nutscript/gamemode/core/libs/sh_item.lua:330: attempt to compare number with nil

  1. callback - gamemodes/nutscript/gamemode/core/libs/sh_item.lua:330
    1. query - gamemodes/nutscript/gamemode/core/libs/sv_database.lua:31
    2. restoreInv - gamemodes/nutscript/gamemode/core/libs/sh_item.lua:317
      1. callback - gamemodes/nutscript/gamemode/core/libs/sh_character.lua:131
      2. query - gamemodes/nutscript/gamemode/core/libs/sv_database.lua:31
      3. callback - gamemodes/nutscript/gamemode/core/libs/sh_character.lua:113
      4. query - gamemodes/nutscript/gamemode/core/libs/sv_database.lua:31
        1. restore - gamemodes/nutscript/gamemode/core/libs/sh_character.lua:80
        2. callback - gamemodes/nutscript/gamemode/core/hooks/sv_hooks.lua:42
        3. callback - gamemodes/nutscript/gamemode/core/libs/sv_player.lua:22
        4. query - gamemodes/nutscript/gamemode/core/libs/sv_database.lua:31
          1. loadNutData - gamemodes/nutscript/gamemode/core/lib set [DoubleShot|2|STEAM_0:1:47163642] Lua Error:

[ERROR] gamemodes/nutscript/gamemode/core/cl_skin.lua:20: bad argument #3 to 'SetDrawColor' (number expected, got no value)

  1. SetDrawColor - [C]:-1
    1. SkinHook - gamemodes/nutscript/gamemode/core/cl_skin.lua:20
    2. unknown - lua/vgui/dframe.lua:203

[DoubleShot|2|STEAM_0:1:47163642] Lua Error:

[ERROR] gamemodes/nutscript/gamemode/core/cl_skin.lua:20: bad argument #3 to 'SetDrawColor' (number expected, got no value)

  1. SetDrawColor - [C]:-1
    1. SkinHook - gamemodes/nutscript/gamemode/core/cl_skin.lua:20
    2. unknown - lua/vgui/dframe.lua:203

[DoubleShot|2|STEAM_0:1:47163642] Lua Error:

[ERROR] gamemodes/nutscript/gamemode/core/cl_skin.lua:20: bad argument #3 to 'SetDrawColor' (number expected, got no value)

  1. SetDrawColor - [C]:-1
    1. SkinHook - gamemodes/nutscript/gamemode/core/cl_skin.lua:20
    2. unknown - lua/vgui/dframe.lua:203

[DoubleShot|2|STEAM_0:1:47163642] Lua Error:

[ERROR] gamemodes/nutscript/gamemode/core/cl_skin.lua:20: bad argument #3 to 'SetDrawColor' (number expected, got no value)

  1. SetDrawColor - [C]:-1
    1. SkinHook - gamemodes/nutscript/gamemode/core/cl_skin.lua:20
    2. unknown - lua/vgui/dframe.lua:203

[DoubleShot|2|STEAM_0:1:47163642] Lua Error:

[ERROR] gamemodes/nutscript/gamemode/core/cl_skin.lua:20: bad argument #3 to 'SetDrawColor' (number expected, got no value)

  1. SetDrawColor - [C]:-1
    1. SkinHook - gamemodes/nutscript/gamemode/core/cl_skin.lua:20
    2. unknown - lua/vgui/dframe.lua:203

Is it because NutScript cannot identify the items?

Line 330 - if (x <= w and x > 0 and y <= h and y > 0) then local item2 = nut.item.new(item._uniqueID, itemID)

                        if (item2) then
                            item2.data = {}
                            if (data) then
                                item2.data = data
                            end

                            item2.gridX = x
                            item2.gridY = y
                            item2.invID = invID

                            for x2 = 0, item2.width - 1 do
                                for y2 = 0, item2.height - 1 do
                                    slots[x + x2] = slots[x + x2] or {}
                                    slots[x + x2][y + y2] = item2
                                end
                            end

                            if (item2.onRestored) then
                                item2:onRestored(item2, invID)
                            end
                        else
                            badItemsUniqueID[#badItemsUniqueID + 1] = item._uniqueID
                            badItems[#badItems + 1] = itemID
                        end

If you could give me some indication on where to start to fix this i would be incredibly thankful!

bleonheart commented 3 years ago

That is usually reffering to badly coded items