This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

error 100: function prototypes do not match with natives


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
bridgebucket
New Member
Join Date: Mar 2024
Old 03-28-2024 , 21:46   error 100: function prototypes do not match with natives
Reply With Quote #1

trying to use natives, confused on this error. just need some help figuring out what the correct code to use would be. the lines producing this error are these two:

CreateNative("wardenExists", Native_wardenExists);
CreateNative("isWarden", Native_isWarden);

the full code is as follows:

// warden.sp
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max)
{
CreateNative("wardenExists", Native_wardenExists);
CreateNative("isWarden", Native_isWarden);
return APLRes_Success;
}

public bool Native_wardenExists(Handle plugin, int numParams)
{
if(Warden != -1) { return true; }
else { return false; }
}

public bool Native_isWarden(Handle plugin, int numParams)
{
int client = GetNativeCell(1);

for(int i = 2; i <= numParams; i++)
{
client += GetNativeCellRef(i);
}

if(client == Warden) { return true; }
else { return false; }
}

//warden.inc
#if defined _warden_included_
#endinput
#endif
#define _warden_included_

/**
*
* @return true on match, false if not
*/
native bool wardenExists();

/**
*
* @param client client to run the check on
* @return true on match, false if not
*/
native bool isWarden(client);
bridgebucket 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 19:59.


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