Can I have a blank option in an array?

Hey everyone,

I have this array, that I use it to generate random names along with 2 more arrays. You basically pull 3 random numbers, one for each array, and they combine together to generate a name.
This is basically the first part of the name.

I want options 0,4 and 6 to be totally blank.

So for example, if you combine it with my other arrays, and you roll a 4 the first part of your name should be blank, so you may get a name such as

“Cute Heroes”

However if the array variable is left blank, Gdevelop generates a 0 instead of nothing.

0Cute Heroes”

If I put a space in the options 0,4 and 6 the name is shown with a space, which isn’t the best thing really.

" Cute Heroes"

Anyone knows if there is an easy way to “fix” this?

Most simple fix

Condition
At beginning of scene

Action
Change variable 0Basic[0] set to “”
Change variable 0Basic[4] set to “”
Change variable 0Basic[6] set to “”

I thought they fixed that in v. 5.6.269. Or did it only fix it for plain strings not arrays? I wonder if it’s the same for structures?

5.6.269 release notes:

If you’re using the most recent version and it doesn’t work, you could also put in a bug report.

Edit: I just tested it with the most recent online version and I didn’t get any zeroes. The zero would’ve been before the X.

My test setup

Thank you guys, yes this was fixed. I updated my game to work with the newest version.

That’s funny, I was SURE that I created my game after this certain update.

Time goes by so fast… :pensive_face: