GDevelop-extensions icon indicating copy to clipboard operation
GDevelop-extensions copied to clipboard

Fixed hasString and hasNumber for global and object arrays

Open manisto opened this issue 3 months ago • 4 comments

The HasNumber and HasString conditions for objects would always return true, regardless of whether the array contained the specified value or not. The reason was that the functions referenced a nonexistent variable named __ArrayTools.Temp.

This PR removes all occurrences of this prefix, and now uses the extension scene variable simply named Temp.

An example project where the issue is documented has been attached to this PR. ArrayToolsTest.zip

manisto avatar Sep 15 '25 19:09 manisto

Thank you for the fix. Please increment the revision in the version.

D8H avatar Sep 20 '25 21:09 D8H

Someone reported the issue and I forgot about this PR. I guess it's already fixed.

  • https://github.com/GDevelopApp/GDevelop-extensions/issues/1867

D8H avatar Oct 28 '25 22:10 D8H

Someone reported the issue and I forgot about this PR. I guess it's already fixed.

* [[ArrayTools] Scene variable __ArrayTools not exposed properly #1867](https://github.com/GDevelopApp/GDevelop-extensions/issues/1867)

Looks like it. :-) It has the same changes, although it also appends a 2 to the variable names.

manisto avatar Oct 29 '25 15:10 manisto

It’s an action name. The one without the 2 is deprecated.

D8H avatar Oct 29 '25 22:10 D8H