• attempt to index local 'dest' (a nil value)
    4 replies, posted
As the title says, I'm getting this error after a while when using a plugin for my Nutscript RP server. It's a "stash" that allows you to store your items and come back to them later without fear of anybody else getting to them. However, after I store items, this error will appear and there's no immediate way to fix it but to change characters, and even then, it still applies to the original character when you change back to them. I've posted in the official threads and forums to no avail, and the creator of the plugin is away on army duty. Any ideas...? I've attached a .zip of the plugin itself, as well, in case that was needed, but it appears the original issue stems from the default Gmod lua folder. [code]lua/includes/extensions/table.lua:81: attempt to index local 'dest' (a nil value) 1. Merge - lua/includes/extensions/table.lua:81 2. callback - gamemodes/nutscript/gamemode/core/libs/sh_item.lua:511 3. query - gamemodes/nutscript/gamemode/core/libs/sv_database.lua:31 4. loadItemByID - gamemodes/nutscript/gamemode/core/libs/sh_item.lua:501 5. requestStash - gamemodes/hl2rp/plugins/stash/sh_plugin.lua:109 6. unknown - gamemodes/hl2rp/plugins/stash/entities/entities/nut_stash.lua:38[/code] [url]https://www.sendspace.com/file/4g17zt[/url]
Bump? Is this just something I can't fix, or something I can change by changing my local lua files, or...?
Can't see any problem, have you tried looking at all the lines mentioned in the error? For some reason on line 511 of /gamemode/core/libs/sh_item.lua the first argument of table.merge is a nil value. So fine that line and see if you can find any reason for it to be nil, it might cake to another function, possibly line 31 of core/libs/sv_database.lua. Just work your way back and see what you can find. [editline]17th June 2015[/editline] And I can't see anything wrong myself because I don't have nutscript on my computer so I can't check what could be causing the errors in it
[code]nut.db.query("SELECT _itemID, _uniqueID, _data FROM nut_items WHERE _itemID IN "..range, function(data) if (data) then for k, v in ipairs(data) do local itemID = tonumber(v._itemID) local data = util.JSONToTable(v._data or "[]") local uniqueID = v._uniqueID local itemTable = nut.item.list[uniqueID] if (itemTable and itemID) then local item = nut.item.new(uniqueID, itemID) item.data = table.Merge(itemTable.data, data or {}) item.invID = 0 end end end end) [/code] One of your items has an invalid unique id.
[QUOTE=Kogitsune;47992599][code]nut.db.query("SELECT _itemID, _uniqueID, _data FROM nut_items WHERE _itemID IN "..range, function(data) if (data) then for k, v in ipairs(data) do local itemID = tonumber(v._itemID) local data = util.JSONToTable(v._data or "[]") local uniqueID = v._uniqueID local itemTable = nut.item.list[uniqueID] if (itemTable and itemID) then local item = nut.item.new(uniqueID, itemID) item.data = table.Merge(itemTable.data, data or {}) item.invID = 0 end end end end) [/code] One of your items has an invalid unique id.[/QUOTE] Well, seeing as how this happens on an unmodified ModernRP script I guess it's one of the stock items. Looking for whichever item is busted is gonna be [B]fun.[/B]
Sorry, you need to Log In to post a reply to this thread.