[_ahg_core] addons/_ahg_core/lua/ahg/mapvote/cl_mapvote.lua:229: attempt to index field 'votersContainer' (a nil value)
1. UpdateVoters - addons/_ahg_core/lua/ahg/mapvote/cl_mapvote.lua:229
2. func - addons/_ahg_core/lua/ahg/mapvote/cl_mapvote.lua:359
3. unknown - lua/includes/extensions/net.lua:32 (x4)
[_ahg_core] addons/_ahg_core/lua/ahg/mapvote/cl_mapvote.lua:229: attempt to index field 'votersContainer' (a nil value)
1. UpdateVoters - addons/_ahg_core/lua/ahg/mapvote/cl_mapvote.lua:229
2. func - addons/_ahg_core/lua/ahg/mapvote/cl_mapvote.lua:359
3. unknown - lua/includes/extensions/net.lua:32 (x2)
This happens when it tries referencing a player which does not exist. The error happens less often since an update I did about a month ago but still seems to happen. I'll look into this[_ahg_core] addons/_ahg_core/lua/ahg/mapvote/cl_mapvote.lua:229: attempt to index field 'votersContainer' (a nil value) 1. UpdateVoters - addons/_ahg_core/lua/ahg/mapvote/cl_mapvote.lua:229 2. func - addons/_ahg_core/lua/ahg/mapvote/cl_mapvote.lua:359 3. unknown - lua/includes/extensions/net.lua:32 (x4) [_ahg_core] addons/_ahg_core/lua/ahg/mapvote/cl_mapvote.lua:229: attempt to index field 'votersContainer' (a nil value) 1. UpdateVoters - addons/_ahg_core/lua/ahg/mapvote/cl_mapvote.lua:229 2. func - addons/_ahg_core/lua/ahg/mapvote/cl_mapvote.lua:359 3. unknown - lua/includes/extensions/net.lua:32 (x2)
Actually, and I'm not sure if this is how it happened with CodingMachine, this happens if you reopened the vote screen by typing !rtv in chat, no matter if people left or not.This happens when it tries referencing a player which does not exist. The error happens less often since an update I did about a month ago but still seems to happen. I'll look into this
Thanks for this, I'll do some testing regarding this to replicate the issueActually, and I'm not sure if this is how it happened with CodingMachine, this happens if you reopened the vote screen by typing !rtv in chat, no matter if people left or not.
I also didn't vote any of the options, but I don't think that matters:
![]()
What I THINK is happening is this:
- When you close and reopen the map vote screen with !rtv, the field 'votersContainer', wherever that happens to be, stops existing.
*** note that the error is saying that votersContainer is a nil value, not whatever is being indexed into it, which means that either the field doesn't exist, or you tried to access the field in the wrong thing and it defaulted to a nil value. ***
- When another player votes or changes their vote, the code receives that and then tries to use something in the votersContainer, which contains nothing, as it's nil.
*** this appears to happen in the UpdateVoters function, that's why I'm guessing that the error happens when someone votes or changes their vote ***
- i.e. I think either the reopen function when you type !rtv is not restoring all it should or the close function when you close the panel is deleting more than it should.
I just use 1920 x 1080What size screen is everyone using when this happens?