Hello, I am using a double for loop to get a brick from the master brick group. And I am using %brick as my variable, it exists since when I echo it I get a number.
I then store it in an array using if it meets the criteria (It's for a spawn brick) $AnArrayName.add(%brick);
And then at the end I do return $AnArrayName[%randomnumthatisinrange].getSpawnLocation();
getSpawnLocation is a function I've added like this:
function fxDTSBrick::getSpawnLocation() {
//insert code here to work out %endvalue
return %endvalue;
}
But the console spits out an error saying I am attempting to call function getSpawnLocation on ''
Any ideas?