GDevelop threats specific number variable as a string one instead

I am pretty sure that the fact that I used ToString(CurrentWorld) is the reason for it to be happening.

The new variable syntax is having problems with arrays. I put in a bug report but haven’t heard anything yet.

Try using the old syntax Variable() for the structure. It’s really annoying that you need to go back and forth between the variable syntax.

The strange part is that I can normally log it to the console but it always evaluates 0 in the object variable condition and action (with the old syntax too)

It is an structure named 0, seems like renaming it to World_0 solved the issue.

Seems like GDevelop should add that advice to also when you try to name a child variable starting with a number, because the advice only appears to top-level variables.

1 Like