Raised This Month: $ Target: $400
 0% 

cvar never used? :?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
n0br41ner
Senior Member
Join Date: May 2012
Location: Planet Earth
Old 06-17-2012 , 19:25   cvar never used? :?
Reply With Quote #1

I am using the following:

PHP Code:
new mycvar;

public 
plugin_init() {
     
mycvar register_cvar("amx_mycvar""1");

     
/*some code here*/

     
if(get_cvar_num("mycvar") == 1/*or should i put "amx_mycvar" instead of "mycvar" ?*/
          
MyFunction();
}

public 
MyFunction() {
     
/*some code here*/

And when compiling i get:
Code:
warning 204: symbol is assigned a value that is never used: "amx_mycvar"
It compiles successfully but i am getting the warning
Am i doing something wrong?

Last edited by n0br41ner; 06-17-2012 at 19:35. Reason: added initialization :)
n0br41ner 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 06:18.


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