You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you predeclare a string variable, and set it to an empty string, the actual string is set to "0" as shown in the debugger or if called via expressions.
I went back and tested before the variable update, and this is new behavior. Previously it would default to "" when the string was empty.
If I had a guess, my bet would be that the "always force number variables to have 0 if empty" is applying to the string variables as well.
Steps to reproduce
Create a global, scene, object, or instance variable.
Change the type to string.
Delete anything after it.
Run the preview with debugger.
The variable's string will be "0"
Example project: StrVarBug.zip
Is there an existing issue for this?
Describe the bug
Found via Jack on the forums, https://forum.gdevelop.io/t/empty-text-variable/57079/3:
If you predeclare a string variable, and set it to an empty string, the actual string is set to "0" as shown in the debugger or if called via expressions.
I went back and tested before the variable update, and this is new behavior. Previously it would default to "" when the string was empty.
If I had a guess, my bet would be that the "always force number variables to have 0 if empty" is applying to the string variables as well.
Steps to reproduce
Example project: StrVarBug.zip
GDevelop platform
Desktop, Web
GDevelop version
5.4.219
Platform info
OS (e.g. Windows, Linux, macOS, Android, iOS)
OS Version (e.g. Windows 10, macOS 10.15)
Browser(For Web) (e.g. Chrome, Firefox, Safari)
Device(For Mobile) (e.g. iPhone 12, Samsung Galaxy S21)
Additional context
No response
The text was updated successfully, but these errors were encountered: