Raised This Month: $51 Target: $400
 12% 

[SOLVED] Cvar value not correct


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 06-27-2014 , 08:10   [SOLVED] Cvar value not correct
Reply With Quote #1

My cvar always has value 1.
I put run_on_start 0 in amxx.cfg but printf is always called.

Code:
void OnMetaAttach( void )
{
	cvar_t runonstart_cvar = { "run_on_start", "1" };
	g_engfuncs.pfnCVarRegister( &runonstart_cvar );
}


void StartFrame_Post( void )
{
	if( g_engfuncs.pfnCVarGetFloat( "run_on_start" ) )
		printf( "runonstart" );

	RETURN_META( MRES_IGNORED );
}
What am i doing wrong?

EDIT: typo in amxx.cfg

Last edited by OvidiuS; 06-27-2014 at 09:22.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 06-27-2014 , 23:23   Re: [SOLVED] Cvar value not correct
Reply With Quote #2

Try to get the pointer. Check Semiclip module.
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 06-28-2014 , 11:29   Re: [SOLVED] Cvar value not correct
Reply With Quote #3

Thanks, i did that after i started this thread
It was a typo, but i also changed module to use pointers.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
Reply



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 04:51.


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