You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you enable "use protection" and try to click to the air/walls/floor (not props or entities) you will get 14:20:07 [ERROR] addons/nadmodpp/lua/autorun/server/nadmod_pp.lua:246: attempt to index a nil value 1. fn - addons/nadmodpp/lua/autorun/server/nadmod_pp.lua:246 2. unknown - addons/ulib/lua/ulib/shared/hook.lua:109
The reason of this error is NADMOD.Props[ent:EntIndex()].Name. For some reason ent = player that tried to use.
So the solution is add and !ent:IsPlayer() before NADMOD.Props[ent:EntIndex()].Name to check if the ent is not equals player.
Full fixed 246 line:
if !NADMOD.PPConfig["use"] orNADMOD.PlayerCanTouch(ply, ent) or (ent:IsValid() and !ent:IsPlayer() andNADMOD.Props[ent:EntIndex()].Name=="W") then
The text was updated successfully, but these errors were encountered:
If you enable "use protection" and try to click to the air/walls/floor (not props or entities) you will get
14:20:07 [ERROR] addons/nadmodpp/lua/autorun/server/nadmod_pp.lua:246: attempt to index a nil value 1. fn - addons/nadmodpp/lua/autorun/server/nadmod_pp.lua:246 2. unknown - addons/ulib/lua/ulib/shared/hook.lua:109
The reason of this error is
NADMOD.Props[ent:EntIndex()].Name
. For some reason ent = player that tried to use.So the solution is add
and !ent:IsPlayer()
beforeNADMOD.Props[ent:EntIndex()].Name
to check if the ent is not equals player.Full fixed 246 line:
The text was updated successfully, but these errors were encountered: