AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved fatal error 186: insufficient memory (https://forums.alliedmods.net/showthread.php?t=324639)

Tilex 05-24-2020 07:04

Re: fatal error 186: insufficient memory
 
https://wiki.alliedmods.net/Creating...Mod_Scripting)
So, from what I get here, you are working with two scripts. One is creating a Native to be used from the other. The one defining the Native has the line:
CreateNative("JC_GetCaptain", Native_Obtener);

You also need to create an include file with contents like:
PHP Code:

/** Double-include prevention */
#if defined _mynatives_included_
  #endinput
#endif
#define _mynatives_included_
 
native int JC_GetCaptain(); 

Now include it with:
#include "filenameOfIncludeInSameDirectory.inc"
Then you should be able to run: if(JC_GetCaptain() == client)

BloodBullet 05-24-2020 10:28

Re: fatal error 186: insufficient memory
 
Quote:

Originally Posted by Tilex (Post 2701984)
https://wiki.alliedmods.net/Creating...Mod_Scripting)
So, from what I get here, you are working with two scripts. One is creating a Native to be used from the other. The one defining the Native has the line:
CreateNative("JC_GetCaptain", Native_Obtener);

You also need to create an include file with contents like:
PHP Code:

/** Double-include prevention */
#if defined _mynatives_included_
  #endinput
#endif
#define _mynatives_included_
 
native int JC_GetCaptain(); 

Now include it with:
#include "filenameOfIncludeInSameDirectory.inc"
Then you should be able to run: if(JC_GetCaptain() == client)

Thanks A LOT !!! it works . i really didn't think about that


All times are GMT -4. The time now is 21:30.

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