Thread
:
[Pawn Question] How to set a function as a parameter for a function?
View Single Post
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
04-11-2015 , 11:41 Re: [Pawn Question] How to set a function as a parameter for a function?
#
17
Quote:
Originally Posted by
nergal
just an expansion on this thread
I tried to do this
PHP Code:
Function
func
=
pack
.
ReadFunction
();
int param1
=
pack
.
ReadCell
();
if (
param1
>
0
)
func
(
param1
);
and I get an error saying "invalid function call, not a valid address."
Is there seriously no other way to call a function without using call_startfunction?
iirc Function variables aren't closures. You have to use Call_StartFunction or put them into a Forward to call them.
__________________
Not currently working on SourceMod plugin development.
Powerlord
View Public Profile
Find More Posts by Powerlord