NPC Code:
function onActionSetMatchServer(match, vplayer, splayer) {
for (temp.i = 0; temp.i <= 10; temp.i++) {
if (match == i) makevar("serverr.sdematch" @ i) = {vplayer, splayer};
}
}
Why not this instead:
NPC Code:
function onActionSetMatchServer(match, vplayer, splayer) {
makevar("serverr.sdematch" @ match) = {vplayer, splayer};
}
Don't make a loop if you don't have to
This looks even sexier:
NPC Code:
function onActionSetMatchServer(i, v, s) serverr.(@"sdematch" @ i) = {v, s};
serverr. and server. are the devil though.