Raised This Month: $51 Target: $400
 12% 

Solved Plugin dependencies (Natives)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 11-05-2016 , 13:17   Plugin dependencies (Natives)
Reply With Quote #1

Hi everyone,

I have two plugins A & B. My plugin B needs to use a native from the plugin A.

Plugin A:
PHP Code:
Handle gl_my_forward;

public 
void OnPluginStart()
{
    
gl_my_forward CreateForward(ET_IgnoreParam_Cell);
}

/* ... AskPluginLoad2 ... */

public int my_native_fct(Handle hPluginint iNumParams)
{
    
AddToForward(gl_my_forwardhPluginGetNativeFunction(1));
    return 
0;

Plugin B:
PHP Code:
public void OnPluginStart()
{
    
my_native(xxxxxxxx);

---------------------
My issue is that "OnPluginStart()" of the plugin B is called before "OnPluginStart()" of the plugin A. This means that the global variable "gl_my_forward" isn't still initialized in the plugin A ==> Error.

Is it the normal behavior? Is there a clean solution to this issue?

Thank you
__________________

Last edited by micapat; 11-05-2016 at 18:43.
micapat is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:56.


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