Raised This Month: $ Target: $400
 0% 

Setting bit with cvar


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
aaarnas
Veteran Member
Join Date: Jun 2008
Location: Lithuania
Old 04-17-2010 , 10:11   Setting bit with cvar
Reply With Quote #1

Hi, I made a little thing like:

Code:
#define set_bit(%1,%2)	%1 = ~%2
new bit
And then I can set values to true or false.
Code:
set_bit(bit, <value>)
When I typing like this:
set_bit(bit, 3)

everything works perfect, but I want to make it changeable with cvar:

Code:
new temp = register_cvar("cvar", "3")
set_bit(bit, get_pcvar_num(temp))
I'm getting incorrect value (1 instead of 3).
How to make it work correctly ?
aaarnas 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:18.


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