View Single Post
  #1  
Old 06-02-2005, 07:11 PM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
gs2 debug error?

just testing what would happen i made this:
PHP Code:
function onActionserverside(acc,weapon){
  
findplayer(acc);
  if(
!= NULL) echo("Found Player: " e);
    else echo(
"Player NOT found:" acc);
  
e.addweapon(weapon);

}

//#CLIENTSIDE
function onPlayerchats(){
 
tokens player.chat.tokenize();
   if(
tokens[0] == "/findplayer"){
     
triggeraction(0,0,"serverside","Sern",tokens[1],tokens[2]);
  }

and when weapon = NULL it returns a function error to the RC.

yes i could just add if(weapon != NULL) but i wanted to see if gs2 would look for the function addweapon if no weapon was specified. this also happens to removeweapon

this also happens if the weapon doesn't exist
GraalScript: Function addweapon not found at line 5 in script of Sern (in level test.nw at pos (0, 0))
__________________

Reply With Quote