Raised This Month: $ Target: $400
 0% 

[SNIPPET] Remove compiler warnings on SM 1.3 for plugins that use AskPluginLoad


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
psychonic

BAFFLED
Join Date: May 2008
Old 08-03-2009 , 08:38   [SNIPPET] Remove compiler warnings on SM 1.3 for plugins that use AskPluginLoad
Reply With Quote #1

Function prototype:
Change
PHP Code:
public bool:AskPluginLoad(Handle:myselfbool:lateString:error[], err_max
to
PHP Code:
#if SOURCEMOD_V_MAJOR >= 1 && SOURCEMOD_V_MINOR >= 3
public APLRes:AskPluginLoad2(Handle:myselfbool:lateString:error[], err_max)
#else
public bool:AskPluginLoad(Handle:myselfbool:lateString:error[], err_max)
#endif 


Return Value:

Returning True (Success)
Change
PHP Code:
return true
to
PHP Code:
#if SOURCEMOD_V_MAJOR >= 1 && SOURCEMOD_V_MINOR >= 3
    
return APLRes_Success;
#else
    
return true;
#endif 

Returning False (Failure)
Change
PHP Code:
return false
to
PHP Code:
#if SOURCEMOD_V_MAJOR >= 1 && SOURCEMOD_V_MINOR >= 3
    
return APLRes_Failure;
#else
    
return false;
#endif 

Returning False (Silent Failure) NEW
Change
PHP Code:
return false
to
PHP Code:
#if SOURCEMOD_V_MAJOR >= 1 && SOURCEMOD_V_MINOR >= 3
    
return APLRes_SilentFailure;
#else
    
return false;
#endif 
psychonic is offline
 


Thread Tools
Display Modes

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 18:23.


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