An easier more efficient approach would be to create a multi-dimensional array of warp coordinates:
PHP Code:
function onCreated(){
//x, y
this.warplocations = {
{5, 10},
{5, 20},
{5, 30},
{5, 40},
{15, 10},
{15, 20},
{15, 30},
{15, 40},
};
this.warpamount = this.warplocations.size();
}
And then increment an array index variable each time a player enters:
PHP Code:
function onPlayerEnters(){
player.x = this.warplocations[this.warpindex][0];
player.y = this.warplocations[this.warpindex][1];
//Use % to reset a value back to 0 if it overlaps specified value
this.warpindex = (this.warpindex + 1) % this.warpamount;
}