Closed netux closed 4 years ago
This is a problem with arrays holding other variables, as modifying that variable essentially modifies the array:
gvar var = 0
gvar arr = [var]
var = 1
arr[0] // => var => 1, not 0
so, funny thing. This is actually how it used to act with gvar
all together for the most part. This was fixed a month ago, can't remember the commit exactly. This behavior was, eventually, put back in with the const
keyword addition in 6334860a12bea39457842c8de0aa5dfe3db8d04a.
I wonder if arrays slipped through the cracks.
Title is a little weird. Basically, if you create an array like so
and later try to access elements of that array
it transpiles to a Big Message with the string input
Null
(value assigned to the array element) instead ofValue In Array(Value In Array(Global Variable(A), 0), 1)
(reading value from array)Example code
outputs
instead of