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

Solved error 100: function prototypes do not match


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ShawnCZek
Member
Join Date: Mar 2017
Location: Czech Republic
Old 07-07-2017 , 12:05   error 100: function prototypes do not match
Reply With Quote #1

Hello,
I am trying to make a native, because I need share some variables. So I checked some plugins + a tutorial and tried to make it. However, I get an error and I have no idea how to fix it.
Error:
Quote:
// C:\...\addons\sourcemod\scripting\Shop.sp(109 ) : error 100: function prototypes do not match
My include file (shop.inc):
PHP Code:
#if defined _shop_included
 #endinput
#endif
#define _shop_included

/**
 * Gets if there is running a giveaway.
 * 
 * @return bool        True if a giveaway is running, false otherwise.
*/
native bool IsGiveawayRunning(); 
My plugin file (Shop.sp - error is on line with `CreateNative`):
PHP Code:
public APLRes AskPluginLoad2(Handle myselfbool latechar[] errorint err_max)
{
   
CreateNative("IsGiveawayRunning"Native_IsGiveawayRunning);
   
   return 
APLRes_Success;
}

public 
bool Native_IsGiveawayRunning(Handle pluginint numParams)
{
    return (
IsGiveaway || IsGiveawayLastCT || IsGiveawayKills || IsGiveawayAnswer);

Thanks for help.

Last edited by ShawnCZek; 11-03-2018 at 11:23.
ShawnCZek is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 07-07-2017 , 12:33   Re: error 100: function prototypes do not match
Reply With Quote #2

native functions (https://sm.alliedmods.net/new-api/functions/NativeCall) need to return int, not bool
Miu is offline
ShawnCZek
Member
Join Date: Mar 2017
Location: Czech Republic
Old 07-07-2017 , 13:06   Re: error 100: function prototypes do not match
Reply With Quote #3

Quote:
Originally Posted by Miu View Post
native functions (https://sm.alliedmods.net/new-api/functions/NativeCall) need to return int, not bool
Oh, I am dumb. Thanks a lot for help!
ShawnCZek is offline
Reply



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 15:00.


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