I have the following test code, given the test string when its converted to an int it changes to 3132684. What am I missing? Is there a better method to convert the string?

var testString = "31326825" var t2 = int(testString )

EDIT: It seems that the error is not in the code but the way the editor displays the number in the debugger inspector.

you got to to do int(float(string))

@1000h said: you got to to do int(float(string))

Thank you for the help. I did try that before posting my comment. It did not help things. It just seems like its an issue with the debug inspector. When I print that out it looks ok.

5 years later