Quote:
Originally Posted by fowlplay4
PHP Code:
temp.pl = player; temp.warped = findplayer2(params[1]); if (temp.warped != NULL) { temp.pl.setlevel2(temp.warped.level, temp.warped.x, temp.warped.y); } else { temp.pl.chat = "Can't find" SPC params[1]; } }
|
Also, there's no reason to store the player object in a temporary variable—it's just confusing to anybody reading the script (as are the variable names you (khortez) used). The current player will remain in scope.
PHP Code:
temp.pl = findplayer2(params[1]);
if (temp.pl != NULL) {
player.setlevel2(temp.pl.level, temp.pl.x, temp.pl.y);
} else {
player.chat = "Can't find" SPC params[1];
}
}