It would be better to use an array, because it is shorter code and easier to extend.
Code:
new variable1;
new variable2;
new variable3;
random_variable()
{
switch(random(3))
{
case 1: return variable2;
case 2: return variable3;
}
return variable1;
}
Code:
new variables[3];
random_variable()
{
return variables[random(sizeof(variables))];
}
__________________