Nexus Gamemode Fix (Fixing Lua Errors On Item Pickup)

It’s as simple as editing one line of code.

For Nexus

Navigate to nexus\gamemode\core\sh_core.lua and open your editor, I prefer Notepad++ as most do. Anything the code line numbers should work just fine.

Then, find line 1435. It should look like this:



local panel = menu.Panels[#menu.Panels];
 

Change it to



local panel = nil;


For OpenAura

Pretty much the same process as above, but slightly different.

Navigate to openaura\gamemode\openaura\sh_core.lua and open your editor, I prefer Notepad++ as most do. Anything the code line numbers should work just fine.

Then, find line 1526. It should look like this:



local panel = menu.Panels[#menu.Panels];


Then Change it to



local panel = nil;


Restart your server and your problem should be solved. Openaura should work, haven’t tested it though. Tell me if it does below please.

It looks like your removing functionality instead of actually fixing the issue

The gamemode works fine after you change that line of code. It’s just disabling a panel feature that conflicts with the new update. There’s no visual differences nor feature differences. It just removes something that is not needed and doesn’t work.

-snip-

Well hell, here I was, waiting for Garry to fix it.

Much obliged, mate, I’ll put this fix to use right away. Thanks :).

Didn’t work. It’s because the parameter is expected in cl_skin.lua as well, and you can’t just change a variable there, it’s part of a pairs statement. What’s the current table argument for what it needs? It’s these lines.

[lua]for k, v in pairs(panel.Panels) do
v:PerformLayout(); w = math.max( w, v:GetWide() );
end;[/lua]

The function prior to the pairs statement receives panel as an argument, then moves into using it as a table for the pairs statement, where Panels is deprecated. Is there a replacement for it?

try panel:GetItems()

Will that return the property that panel.Panels was? If so, I believe we have a fix.

worked for me when I tested it

What does it fix?

Nexus Gamemode Fix (Fixing Lua Errors On Item Pickup)

It’s official, that fix made my day. Thanks Knallex, you’re a life saver :), it worked.

Ok this is actually how you fix it…


 local panel = menu.Panels[#menu.Panels]; 

should be:


 local panel = menu.Items[#menu:GetItems()]; 

Doesn’t remove anything. This is what i changed it to and it works perfectly

EDIT: Just saw knallex posted something similar :s

no problem, Killer