• Error I don't know how to fix
    2 replies, posted
Hi guys, I am having a really dumb issue. The console states that: [gamemodes\zmod\gamemode\init.lua:185] attempt to index local 'ItemDef' (a nil value) This is line 185 from init: ent:SetVar("Info", { Name = name, Uses = ItemDef.Uses } ); I'm sorry its one of 'these' posts. I am just learning :smile: [editline]8th August 2012[/editline] Also, I have this error from 285: Hook 'HHM.KeyPress' Failed: [gamemodes\zmod\gamemode\init.lua:285] attempt to index a nil value Here is 285: if key == IN_USE && IsValid(tr.Entity) && HHM.IsItem(tr.Entity:GetVar("Info").Name) then [highlight](User was banned for this post ("undescriptive thread title again" - Gran PC))[/highlight]
ItemDef is nil and something else like tr, key, or HHM is also nil so you can't use any accesors on them. Make sure they are set to something before accessing a variable or method.
Thanks!
Sorry, you need to Log In to post a reply to this thread.