cvar is a string

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

cvar is a string

Post 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 ?
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

local.myinteger = int local.mystring

or

local.myfloatingpointvalue = float local.mystring

8-)
Image
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

I was just about to delete this post T|Trude and I figured out the same thing but thanks jv
Image
Post Reply