I would love to learn how to make a function with function as an argument, like a nested function. I’ve searched for an hour now, and i still havn’t found anything helpful, so i was hoping you guys could help me.
You know when you fx. want to make a timer, it looks like this.
timer.Create(identifier, delay, repetitions, func)
I was trying to find the source to this function in gmods files, but i couldn’t.
This is what i am looking for.
local function DoSomething(func) --Excacute the argumented function end DoSomething(function() print("hello") end)
No matter how i wrap my mind around it, i just cant figure it out. Anyone know how to do this?