I’m trying to learn lua and I’m having some difficulties grasping the complete function function (lol)
I get that
function func() print("hi") end func()
That basiclly prints hi to console because you ran that function, but what I don’t get is
Here is a sample code from wiremod.com that I don’t quite understand.
local function superjump( ply, command) ply:SetVelocity(Vector(0,0,1000)) end concommand.Add( "SuperJump", superjump )
From what I read in the wiki you have to define the args in the function, so in that case what is ply and what and why is command not defined.