[Solved] Bracket format for retrieving value from global array, always returning 0

Hello! I am trying to display strings from a global array variable on screen. The problem is that the string values always show up as 0.

Here is my global variable:

(Just to clarify, I actually don’t have any quotes around the child values when I’m creating the array. I might have used an old screenshot where I had them in by accident).

This is my attempt to get the first element in the array (which is called capturedPetArray)

Then when I print tempPetName in a text object, it is always 0.

Am I messing up somewhere in the array setup or accessing the element by index? I bet it’s something really silly and trivial…


Idea is
If variable is NOT a string so number then you use ToString(VariableName)
If it is already a string then you use VariableString(VariableName)

GlobalVariableString for global var
VariableString for scene var
ObjectName.VariableString for object var

1 Like

This was it! Thanks so much!