TeamUlysses / ulib

ULib: A Lua library for more rapid development on Garry's Mod servers
http://ulyssesmod.net
Other
105 stars 55 forks source link

Advdupe2 area copy doesn't work with ulib #98

Closed Strand8319 closed 7 months ago

Strand8319 commented 7 months ago

Steps to reproduce

  1. Clone advdupe2 from wiremod repo
  2. Activate area copy by pressing shift+rmb

Expected behavior

advdupe2 should work as normal, but ulib somehow killed it

Actual behavior

it'll kill advdupe2

Error(s) in server console, if any


Error(s) in player's console, if any

[build_advdupe2] addons/build_advdupe2/lua/weapons/gmod_tool/stools/advdupe2.lua:1689: attempt to call field 'Iterator' (a nil value)

  1. FindInBox - addons/build_advdupe2/lua/weapons/gmod_tool/stools/advdupe2.lua:1689
    1. fn - addons/build_advdupe2/lua/weapons/gmod_tool/stools/advdupe2.lua:1731
    2. unknown - addons/ulib/lua/ulib/shared/hook.lua:109

Version

ULib v2.71d (04/05/24) ULX v3.81d (03/24/24)

thecrankytech commented 7 months ago

Tl;dr: Not Ulib, try removing the all addons and adding them back one by one and testing which causes the error when using AdvDupe2.

Wasn't able to reproduce this. Setup a fresh server with only the AdvDupe2, Ulib and ULX addons installed. However, the issue is with ents.Interator() within the advdupe2.lua file, not ULib.

Take a look at the wiki page for the ents.Iterator documentation, chances are its another addon that's conflicting with iterator function that makes use of the GM:OnEntityCreated or GM:EntityRemoved hooks.

https://wiki.facepunch.com/gmod/ents.Iterator

SticklyMan commented 7 months ago

thecrankytech is correct, this should not be ULib's fault. If you find any evidence otherwise, post back and let us know what you found and we can look into it further.