PERP sv_hooks.lua Errors

I know you folks do not like perp, but I would greatly appreciate any help!

I am not a lua coder, however I do have some experience with Python, so I’m not completely lost.

I’m getting the following errors in my server console, help with even one of the following would be sooo awesome!

[1]
[ERROR] gamemodes/perp/gamemode/sv_hooks.lua:117: bad argument #2 to ‘Simple’ (function expected, got nil)

  1. Simple - [C]:-1
  2. unknown - gamemodes/perp/gamemode/sv_hooks.lua:117

[sv_hooks around line 117]


function GM:InitPostEntity ( )
	self.GatherInvalidNames();
	
	timer.Simple(1, GAMEMODE.PushNumPlayers);
end

[2 - on player join]

[ERROR] gamemodes/perp/gamemode/sv_hooks.lua:131: attempt to call field ‘PushNumPlayers’ (a nil value)

  1. unknown - gamemodes/perp/gamemode/sv_hooks.lua:131

[sv_hooks around line 131]



function GM:PlayerConnect ( )
	self.PushNumPlayers();
end


Please note that the mysql information is handled by sv_hooks.lua. Currently, the server is connecting and operating with the mysql server just fine.

Thats currently the only pressing issues I see right now. As said before, any help is much appreciated! If you need more information, or the entire sv_hooks.lua file, I’d be more than happy to oblige.

timer.Simple(1, function() GAMEMODE.PushNumPlayers end);

Thanks a ton! Do I need the end down below it?

So this



timer.Simple(1, GAMEMODE.PushNumPlayers);
end


Should end up being



timer.Simple(1, function() GAMEMODE.PushNumPlayers end);


[lua]function GM:InitPostEntity ( )
self.GatherInvalidNames();

timer.Simple(1, function() GAMEMODE.PushNumPlayers end);

end[/lua]

Edit: read your PMs.

Are you getting my replies to the message?

Just a guess:
[lua]
function GM:PlayerConnect ( )
GAMEMODE.PushNumPlayers();
end
[/lua]
I’m not sure if this is correct, but I’ve seen it like that before…

It’s not that we don’t like PERP, it’s just we don’t like to help people using private game-modes that do not possess a valid license – Facepunch is against piracy.

That is the same line thats just a bit down below.

[editline]13th February 2013[/editline]

From what I understand, and correct me if I’m wrong; When Pulsar Effect Shut down, the creators released the server files to a couple Communities, after which it was leaked.

Once the original developers of Pulsar figured this out, they said screw it and that anybody could do what they please with it.

If what I had read is correct, this means that yes, during some point it was leaked content, which would have been piracy. However, in current times that has changed.

I’m talking about the second piece of code…

Oh, my bad. Forwarding the possible fix now and will test it out.

Also, the fix that was forwarded for #1;
[lua]
timer.Simple(1, function() GAMEMODE.PushNumPlayers end);
[/lua]
Did not work :(.

EDIT:
Nor did the one I just forwarded from you.

Thanks for the help anyways guys, it is much appreciated.

We never said that anyone could do what they please with the code.