Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SV error: attempt to index field 'HeadEnt' #431

Open
wrefgtzweve opened this issue Jun 28, 2023 · 3 comments
Open

SV error: attempt to index field 'HeadEnt' #431

wrefgtzweve opened this issue Jun 28, 2023 · 3 comments
Labels

Comments

@wrefgtzweve
Copy link
Contributor

I've had this sv error happen a few times over the last few days from different players, not sure how to exactly trigger it but i assume it's somehow getting through the dupe sanitization.

addons/advdupe2/lua/weapons/gmod_tool/stools/advdupe2.lua:192: attempt to index field 'HeadEnt' (a nil value)
   1.  __index - [C]:-1
    2.  GetDupeElevation - addons/advdupe2/lua/weapons/gmod_tool/stools/advdupe2.lua:192
     3.  LeftClick - addons/advdupe2/lua/weapons/gmod_tool/stools/advdupe2.lua:215
      4.  <unknown> - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:226
@thegrb93
Copy link
Contributor

Might be the player's dupe table getting cleared and that code still being executed somehow. The sanitization checks for HeadEnt.

@thegrb93
Copy link
Contributor

Could probably just add or not ply.AdvDupe2.HeadEnt to https://github.com/wiremod/advdupe2/blob/master/lua/weapons/gmod_tool/stools/advdupe2.lua#L206

@thegrb93
Copy link
Contributor

Or change it to an AdvDupe2.IsValidDupe call

@thegrb93 thegrb93 added the bug label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants