balmut
Member
Hi guys sorry to bother you all, I've been googling round for a solution to this but without any luck.
What I'm trying to do is reduce the amount of code needed by using an array of values instead of several if statements.
I have a couple different arrays with similar names (aType, bType, cType), I want to be able to call the correct array using a Variable. Using draw something like this looks right but it doesn't seem to reference the array in practice;
So name could = a or b or c
so if name = a, it should output aType[r]. If b = bType[r] etc...
Any and all help would be greatly appreciated
Thanks!
What I'm trying to do is reduce the amount of code needed by using an array of values instead of several if statements.
I have a couple different arrays with similar names (aType, bType, cType), I want to be able to call the correct array using a Variable. Using draw something like this looks right but it doesn't seem to reference the array in practice;
So name could = a or b or c
Code:
var t = (string(name) + "Type");
var r;
for (r = 0; r <array_length_id(t); r+=1){
array = t[r];
}
Any and all help would be greatly appreciated
Thanks!