MattJeanes / Doors

A generic bigger-on-the-inside entity for Garry's Mod
MIT License
11 stars 4 forks source link

Fixed propscan being nil and tried to be compared #31

Closed ryanm2711 closed 10 months ago

ryanm2711 commented 11 months ago

Constantly caused this error on the client:

[Doors] lua/entities/gmod_door_interior/modules/sh_cordon.lua:101: attempt to compare nil with number
  1. v - lua/entities/gmod_door_interior/modules/sh_cordon.lua:101
   2. CallHook - lua/entities/gmod_door_interior/shared.lua:31
    3. CallHook - lua/entities/gmod_tardis_interior/shared.lua:43
     4. unknown - lua/entities/gmod_door_interior/cl_init.lua:45 (x89)
MattJeanes commented 10 months ago

Hey, I appreciate the patch but this isn't quite the right fix to the problem here, it's more of a workaround. If this error is possible it means the core init code isn't working properly as that should always be set during initialization here: https://github.com/MattJeanes/Doors/blob/f75899e351032428bccb5fa42e837e42d86d7e46/lua/entities/gmod_door_interior/modules/sh_cordon.lua#L5

If you can find me a reliable way to reproduce this error then I can fix the core issue, but for now, I'm going to close this PR.