Thread: Mailing System
View Single Post
  #15  
Old 05-29-2007, 01:52 AM
bscharff bscharff is offline
Bloo
bscharff's Avatar
Join Date: Sep 2006
Location: San Antonio, Texas
Posts: 185
bscharff has a little shameless behaviour in the past
Send a message via AIM to bscharff Send a message via MSN to bscharff Send a message via Yahoo to bscharff
Got My Server Fixed...

Here's What I Have For NPC: Mail
PHP Code:
function onCreated()
 
createVariables();

function 
createVariables(){
  
setVars();
  
calcMostSent();
  
this.mailIDs = {"Main House""Bloos House""Events House""Cafe""Tavern" "Lounge"}; // Add as many as you wish
}


function 
setVars(){
  for (
iallplayers){
    
temp.player findPlayer(i);
      if (
temp.player != null){
        
this.sentmail.(@temp.player) = temp.player.clientr.sentmailamt;
    }
  }
}

public function 
calcMostSent(){
  
setVars();
  
temp.keys getstringkeys("this.sentmail.");
  
setarray(temp.mostsent2);
    for (
temp.0temp.temp.keys.size(); temp.++) {
      
temp.current makevar("this.sentmail." temp.keys[temp.i]);
        if (
temp.current temp.mostsent[1]) {
          
temp.mostsent[1] = temp.current;
          
temp.mostsent[0] = temp.keys[temp.i];
      }
}
   
serverr.mail.mostsent = {temp.mostsent[0],temp.mostsent[1]};
   return 
temp.mostsent[0];  

Error Received:
Script compiler output for Mail (in level main_level.nw at pos (30.5, 30)):
error: unexpected token: "Lounge" at line 7: this.mailIDs = {"Main House", "Bloos House", "Events House", "Cafe", "Tavern" "Lounge"}; // Add as many as you wish
error: missing semicolon at line 7: this.mailIDs = {"Main House", "Bloos House", "Events House", "Cafe", "Tavern" "Lounge"}; // Add as many as you wish
error: unexpected token: } at line 8: }

SEE NEXT PAGE.
Reply With Quote