Skip to content

Allow storing value of zero in script array vars#1109

Merged
mrimer merged 1 commit intoCaravelGames:masterfrom
Hypexion:array-var-zero-entries
Apr 14, 2026
Merged

Allow storing value of zero in script array vars#1109
mrimer merged 1 commit intoCaravelGames:masterfrom
Hypexion:array-var-zero-entries

Conversation

@Hypexion
Copy link
Copy Markdown
Collaborator

When script arrays were added, the implementation erased entries set to zero to save some memory. However, I later added some commands that check an entire array, which the no-zero implementation conflicts with. It now matters if a user sets an array value to zero, and it could cause confusion if full-array commands act as if those values don't exist.

I've changed it so setting an array value to zero no longer erases it. Unset indices still return zero, because they have to return something.

@mrimer mrimer merged commit 452dc11 into CaravelGames:master Apr 14, 2026
1 check passed
@Hypexion Hypexion deleted the array-var-zero-entries branch April 14, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants