Converting String to Int

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

BrownCow

I Heart Gnat.
Jun 18, 2000
965
0
0
44
While i'm here, spamming the board :p

I need to convert a String to an int value. I tried ATOI, the trusty c function, but that gave me crap.

local int i;
local myString;

i = atoi(myString);


It gave me a type error on that. Am i a moron? How is this done in uscript?
 

ca

CHiMERiC Grandmaster
Oct 11, 1999
84
0
0
www.unrealscript.com
I'm not sure if there is a real difference - I always just cast strings to ints instead of using atoi(), and I've never had any problems with it.