Raised This Month: $ Target: $400
 0% 

Checking pcvar/cvar - what method is fastest / best


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mordi
Senior Member
Join Date: Jul 2007
Location: o rly?
Old 09-30-2007 , 10:36   Checking pcvar/cvar - what method is fastest / best
Reply With Quote #1

When checking for a pcvar or a cvar in the start of a function, should i use:

Code:
public function() 
{
    if(get_pcvar_num(pcvar))
    {
        something
    }
}


or...

Code:
public fuction()
{
    if(!get_pcvar_num(pcvar))
        return PLUGIN_HANDLED
        
    something
    
}
What is the most efficient way?
__________________
Quote:
Originally Posted by Alka View Post
engine ?! 0o... *barf*

Last edited by mordi; 09-30-2007 at 10:38.
mordi 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 16:09.


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