0
Planned

String to Number but how?

eagleeyez 4 months ago in Game Creator updated by Marti (Lead Developer) 4 months ago 1

A number is inputed into a string through a InputField

Then OnVariableChanged Trigger 

I want to save this string to a number (int)


your String Variable action allows selecting a string and a number but does no casting.

Unity version:
2019.3.14
Game Creator version:
1.1.8
Planned

The problem with converting strings to integer is that, if you try to convert "hello" string into a number, it will throw an exception. I'll open a ticket to convert variables to string values on the next update. I'll also create the Action to convert strings to integers, although I'm a bit hesitant to do so, since it can lead to errors.