Quote:
Originally Posted by Cubical
PHP Code:
function addExp(amount){
clientr.exp += amount;
}
...
PHP Code:
function addExp(amount){
temp.exptable = { 0, 10, 20, 40,75, 100 };
if (clientr.exp + amount <= temp.exptable[clientr.level]){
clientr.exp += amount;
} else player.levelUp();
}
function levelUp(){
clientr.level++;
clientr.exp = 0;
}
|
the
addExp() function needs to be a public function