Closed Nordsoft91 closed 3 months ago
I did a bit of investigation and this seems like a Godot problem. str_to_var
returns a variable of type int whenever a string begins with a digit. This behavior is also inconsistent with String.is_valid_int()
:
var s: String = "1a"
print(s.is_valid_int()) # prints false
print(typeof(str_to_var(s)) == TYPE_INT) # prints true
I'll probably open an issue in the Godot repo. or not... it might be intentional. I think I can come up with a quick workaround.
Should be fixed in v2.4.9.
item protoset
code
Expected result:
Actual result: