AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   What's better? forward of callfunc? (https://forums.alliedmods.net/showthread.php?t=116538)

joropito 01-23-2010 21:52

What's better? forward of callfunc?
 
I can't find a thread of a discussion about forwards and callfunc differences.

What's better?
I mean, it's better to use CreateOneForward of directly try to call the public function using callfunc?

Advantages/Disadvantages?

Thanks

Exolent[jNr] 01-23-2010 23:38

Re: What's better? forward of callfunc?
 
I prefer to use callfunc because you can have cross plugin communication without one plugin requiring another.
What I mean by that is Plugin A can execute a forward in Plugin B and plugin B can execute a forward in Plugin A.
Also, callfunc can allow you to set byref arguments easier and such.

joropito 01-24-2010 08:28

Re: What's better? forward of callfunc?
 
Quote:

Originally Posted by Exolent[jNr] (Post 1065252)
I prefer to use callfunc because you can have cross plugin communication without one plugin requiring another.
What I mean by that is Plugin A can execute a forward in Plugin B and plugin B can execute a forward in Plugin A.
Also, callfunc can allow you to set byref arguments easier and such.

Yes but you can only use integer&float by ref with callfunc.

And about performance? Is there a big difference or not?
I guess not.

Thanks


All times are GMT -4. The time now is 07:20.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.