AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   set cvar num with value with point (https://forums.alliedmods.net/showthread.php?t=222693)

faki 08-05-2013 12:45

set cvar num with value with point
 
set_cvar_num("mycvar", 1.0)

argument type mismatch (argument 2)

Tell me how to fix that?

ConnorMcLeod 08-05-2013 13:02

Re: set cvar num with value with point
 
num is integer
float is float

anyway, use cvar pointers :

set_pcvar_num(pcvar, 1)
set_pcvar_float(pcvar, 1.0)

^SmileY 08-05-2013 14:57

Re: set cvar num with value with point
 
new g_iCvar;

g_iCvar = register_cvar("amx_var","1.0");

>>

set_pcvar_num(g_iCvar,1); or set_pcvar_float(g_iCvar,1.0);


All times are GMT -4. The time now is 15:51.

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