View Single Post
  #13  
Old 06-14-2013, 02:39 PM
khortez khortez is offline
PrototypeX
khortez's Avatar
Join Date: Dec 2008
Posts: 91
khortez will become famous soon enough
Quote:
Originally Posted by cbk1994 View Post
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.leveltemp.pl.xtemp.pl.y);
    } else {
      
player.chat "Can't find" SPC params[1];
    }
  } 
i'll try it that way instead then, thanks. i just always felt like i had to define
something like that in a variable
Reply With Quote