How to convert Dialogic.get_variable("something") to an integer or float instead of string? #1319
-
I tried many ways to convert this variable into an int or float but it won't work resulting in errors. str2var() These all don't work. So I wanted to know if there is a way to convert this string into another value or is that hard coded? What I essentially want to do is this |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Not sure what the problem is. This depends on your godot version too, I assume you use 3.5. Dialogic.get_variable() should return a normal string. |
Beta Was this translation helpful? Give feedback.
Not sure what the problem is.
if int(Dialogic.get_variable('something')) > 23:
should work.This depends on your godot version too, I assume you use 3.5. Dialogic.get_variable() should return a normal string.