What i'm attempting to do is call a function to return some variables, (to load saves and teleport players to them) which are:
$tele[1] = "152.596 101.372 1.01 0 0 -1.00001 0.102687"; //teleport location for apartment save
$tele[2] = "-53.6 -68.24 21.5 0 0 1 1.6"; // teleport location for arch of constantine save
$map[0] = "Apartment.bls"; // apartment save file
$map[1] = "Arch of Constantine.bls"; //arch save file
the random map and tp function
function random(%map, %randomTp) {
%random = getRandom(1,2); // random number between 1 and 2
// random map
switch (%map) {
case 1:
return ($map0);
case 2:
return ($map1);
default:
}
//set teleport to be same as map
%randomTp = %random;
switch (%randomTp) {
case 1:
return ($tele[0]);
case 2:
return ($tele[1]);
default:
}
}
the loading bricks function
function loadBrix() {
schedule(0, 0, serverDirectSaveFileLoad, "saves/" @ random(%map), 3, "", 2, 1);
findclientbyname("Arix").player.setTransform(random(%randomTp));
}
(forgive my formatting)
is it possible to use %map and %randomtp in that function that way?