Just want to say first, I thank everyone for their help. I can do more than most, but I learn best through someone correct my mistakes, and at times showing me whats wrong. With that said:
PHP Code:
function onCreated() {
this.setshape(1, 32, 32);
}
function onActionSetMatchServer(match, vplayer, splayer) {
for (temp.i = 0; temp.i <= 10; temp.i++) {
if (match == i) makevar("this.sdematch" @ i) = {vplayer, splayer};
}
}
function onPlayerTouchsMe()
{
for (temp.j = 1; temp.j <= 10; temp.j++) {
say2("Match" @ var("this.sdematch" @ j) @ ": " @ this.sdematch1[0] @ " vs. " @ this.sdematch1[1] @ "
");
continue;
}
}
function onPlayerChats(){
if (player.account in serverr.sdeaccess)
{
if (player.chat.starts("setmatch")) {
temp.match = player.chat.tokenize()[1];
temp.vplayer = player.chat.tokenize()[2];
temp.splayer = player.chat.tokenize()[3];
triggeraction(this.x + 0.5, this.y + 0.5, "SetMatchServer", temp.match, temp.vplayer,temp.splayer);
}
}
}
I was attempting to make a loop, so when it does the playertouchsme, then does say 2, i dont have to type out every part of each var and array. I know you can do it, and I know im doing it wrong. I can only get it to say the first match.