Raised This Month: $ Target: $400
 0% 

better way to declare CVARs


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
gamer99
Senior Member
Join Date: Jul 2011
Old 07-14-2011 , 11:27   better way to declare CVARs
Reply With Quote #1

Hi ,

Suppose I have a CVAR

g_dTest = register_cvar("test","1")

Now g_dTest I have declared globaly . Suppose I need to use the value of
the cvar within one function with is being called every 1 sec. So i wrote

new iTest = get_pcvar_num(g_dTest) inside the function .
But with this get_pcvar_num is being called also every time .
Can we do like
1)declaring iTest globally and then calling one function which will set the value of iTest globally ?

Is there any disadvantage in this ?or what is the better way of declaring one cvar ?
gamer99 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 01:07.


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