Hey guys i want to call a static variable name, with a flexible variable code. Heres what i mean. (I apologise for the bad phrasing)
var Slot1 = "";
var Slot2 = "";
var X = 0;
Function onGUI (){
if click button
{
X = 1;
Slot(X) = "Blah blah blah"
}
}
So, therefore, if X = 2, i would transform Slot2 instead.
Seems like something basic, but Slot(X), isnt working, and im missing something here. What suffix do i add to ‘Slot’, for it to recognise X?
Thankyou!
You never want to use multiple variables like that. As I said, use an array. If you don't understand arrays, you really need to look them up since it's a fundamental part of programming.
– Eric5h5Alright thanks
– Trouch