cl_notice.lua issue after latest GMOD Update


[gamemodes\sandbox\gamemode\cl_notice.lua:4] attempt to index global 'notification' (a nil value) error

I encountered this in openAura, as it uses different code for notifications.


function openAura:AddNotify(text, class, length)
        if (class != NOTIFY_HINT or string.sub(text, 1, 6) != "#Hint_") then
            if (self.BaseClass.AddNotify) then
                self.BaseClass:AddNotify(text, class, length);
            end;
        end;
    end;

And the sandbox cl_notice.


function GM:AddNotify( str, type, length )

    notification.AddLegacy( str, type, length )
    
end

Any suggestions? Gladly this only occurs when you undo the things you have spawned.

This is going to be fixed in a patch release.

Do you mean Garry’s Mod patch? Yeah, I think it got fixed one hour ago.

Maybe it’s just me but I still get an error. Even after the update.


[gamemodes\sandbox\gamemode\cl_notice.lua:4] attempt to index global 'notification' (a nil value)

Yup, it still errors.

Has the server been updated?

Yes sir! The server has been updated and I’ve brought in some friends who could not connect before the update just to make sure it was updated properly. Still getting that error. :frowning:

Maybe it’s an OpenAura bug that hasn’t been patched yet?

Also seeing it on our server after manually updating 5 minutes ago and removing all cache files before restarting.
Removed all 3rd party addons (yes, we do listen to you, Garry :wink: ) and verified problem persists.

Correct, as OpenAura uses this for notifications



function openAura:AddNotify(text, class, length)
        if (class != NOTIFY_HINT or string.sub(text, 1, 6) != "#Hint_") then
            if (self.BaseClass.AddNotify) then
                self.BaseClass:AddNotify(text, class, length);
            end;
        end;

Should I try to replace



(text, class, length)

with



( str, type, length )

Or is the function located elsewhere?

Yeah you’re all right I fucked up

That looks fine Slayer - it would only fuck up if it was trying to use variables that I removed - it’s just calling the base function so it should be fine.

Oh, well first I was thinking that openAura does the functions from it’s modules and therefore unfixable.