Empty text variable

Maybe it’s discussable and I don’t know how long it exists, because variable things often change and I’ve seen in the future new created variables will be default type Number instead of String…

But I think it’s a bug if that


doesn’t make this condition true and I have to use “0”

If I later want to make a variable empty, I also have to fill it with “0” or use two different conditions or set it to “” at the beginning to remove the mysteriously internally created 0. For years I’ve more often been a bit confused about how GD handles empty variables, default, for different types…

8 Likes

I encountered the same thing, did you find a way to fix it?

Hm… I’m able to reproduce this and that definitely seems like a bug to me.

I wonder if it’s somehow keeping the default integer value?

Edit: I was able to reproduce this, made an example project, and submitted it over on github. Predeclared String Variables are being populated as "0" when empty instead of "" · Issue #7267 · 4ian/GDevelop · GitHub

1 Like

Have you guys found any workaround ? Same problem here.