Page 1 of 1

cvar is a string

Posted: Mon Apr 12, 2004 10:12 am
by bdbodger
I am useing a menu to setcvars but when I get the cvar from script it gives me the value as a string . Any one have some code that converts the string to a number with ease ?

Posted: Mon Apr 12, 2004 10:39 am
by jv_map
local.myinteger = int local.mystring

or

local.myfloatingpointvalue = float local.mystring

8-)

Posted: Mon Apr 12, 2004 10:45 am
by bdbodger
I was just about to delete this post T|Trude and I figured out the same thing but thanks jv