View Single Post
  #4  
Old 03-26-2012, 03:25 AM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
Quote:
Originally Posted by r3ckless View Post
This is what I have, and it isn't returning my upgrade status...
What am I doing wrong?

PHP Code:
findplayer("Stowen").addweapon(this); 

//#CLIENTSIDE

function onCreated() {
getUpgradeStatus();
sleep("1");
player.chat pl.upgradestatus;
}

function 
getUpgradeStatus(pl) {
  
temp.status pl.upgradestatus;
  switch (
pl.upgradestatus) {
    case 
"gold":
      
temp.status "Gold";
      break;
    case 
"classic":
      
temp.status "Classic";
      break;
    case 
"trial":
      if (
pl.communityname && !pl.communityname.starts("Graal")) {
        
temp.status "Community";
      } else {
        
temp.status "Trial";
      }
      break;
  }
  return 
temp.status;

you're referring to an object, pl, that doesn't exist.

+ you're not even using the function he gave you.
__________________
Reply With Quote