pac3 icon indicating copy to clipboard operation
pac3 copied to clipboard

pac.LocalPlayer sometimes can be NULL

Open Astralcircle opened this issue 7 months ago • 1 comments

[PAC3] lua/pac3/editor/client/logic.lua:56: Tried to use a NULL entity!
    1. EyePos - [C]:-1
        2. Call - lua/pac3/editor/client/logic.lua:56
            3. OpenEditor - lua/pac3/editor/client/init.lua:160
                4. unknown - lua/pac3/editor/client/init.lua:290
                    5. unknown - lua/includes/modules/concommand.lua:54

Image

Astralcircle avatar May 19 '25 07:05 Astralcircle

Looks like this hook attempts to prevent that from happening, but it might be better to just call LocalPlayer() like gmod devs expect users to. https://github.com/CapsAdmin/pac3/blob/e7dddc6f37961e375191fbd6e1cd035b54ef1b00/lua/pac3/core/client/init.lua#L62-L75

thegrb93 avatar May 19 '25 23:05 thegrb93