How to create properly a native for a bool value?
In base plugin:
Code:
new bool:RankedMatch = false; Code:
#if defined _warmode_included In other plugin added the inc file and created a debug command but have error 076: syntax error in the expression, or invalid function call on both "rankedmatch" when compiling Code:
public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max) |
Re: How to create properly a native for a bool value?
if ( RankedMatch() == true )
if ( RankedMatch() == true ) PHP Code:
native bool RankedMatch(); |
Re: How to create properly a native for a bool value?
Is it not exactly what i did ?
|
Re: How to create properly a native for a bool value?
No, notice the red missing paranthesis after RankedMatch. You were calling it like variable instead of a function thus causing the error.
One thing I would personally change is to rename the native to IsRankedMatch and then later call it with if( IsRankedMatch() ). If you use SM 1.11 (not sure if this was already a thing in 1.10) you can use any for the native callback. In the include you can then change it to bool instead of int. |
Re: How to create properly a native for a bool value?
My way:
Code: PHP Code:
PHP Code:
|
Re: How to create properly a native for a bool value?
It works thank you. I just add to add a few more things to plugin2and remove RegPluginLibrary("reputation"); because it was not loading anymore.
#define warmode_AVAILABLE() (GetFeatureStatus(FeatureType_Native, "RankedMatch") == FeatureStatus_Available) native void Native_RankedMatch(); |
All times are GMT -4. The time now is 01:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.