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 (i: allplayers){
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.mostsent, 2);
for (temp.i = 0; temp.i < temp.keys.size(); temp.i ++) {
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.