Quote:
Originally Posted by r3ckless
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.