• Problems with NWInt's and the latest update...
    2 replies, posted
Long story short, here's the code, the error, and what the function [U]should [/U]do. self:SetNWInt("Owner", Owner) [ERROR] entities/entities/ent_item/init.lua:70: bad argument #2 to 'SetNWInt' (number expected, got userdata) 1. SetNWInt - [C]:-1 2. SetContents - entities/entities/ent_item/init.lua:70 3. unknown - gamemode/sv_items.lua:132 4. unknown - lua/includes/modules/concommand.lua:54 When an item is dropped, before the update, this obviously was used to set the owner of the item, which was used for a cash register to sell dropped items. My question is, what (if anything?) can I use in place of this? Clearly fairly new to Lua, so please don't bash and call me an idiot. I know I am.
NWVars are now stricter with what they will allow. I'm guessing Owner is an Entity, you'll likely want to use SetNWEntity instead of SetNWInt.
Works perfectly. Thank you for your quick help.
Sorry, you need to Log In to post a reply to this thread.