Topic: Hi the can some1 please look at this??
I am trying to use the cashmod in punbb and instead of it being cash I want to make it XP and everytime you get to a certain amount of "XP" your points go up heres the script I thought would work...
$cash == $pun_user['cm_cash'];
$lvl == $pun_user['lvl'];
$XP == $pun_user['XP'];
if ($cash<"20"){
$lvl=="1";
$XP =="20"-$cash;
}
else if ($cash=="20"){
$lvl==$lvl+1;
$XP =="20"-$cash;
}
else if ($cash=="40"){
$lvl==$lvl+1;
$XP =="40"-$cash;
}
else if ($cash=="65"){
$lvl==$lvl+1;
$XP =="65"-$cash;
}
else if ($cash=="90"){
$lvl==$lvl+1;
$XP =="90"-$cash;
}
else if ($cash=="120"){
$lvl==$lvl+1;
$XP =="120"-$cash;
}
else if ($cash=="150"){
$lvl==$lvl+1;
$XP =="150"-$cash;
}
else if ($cash=="185"){
$lvl==$lvl+1;
$XP =="185"-$cash;
}
else if ($cash=="225"){
$lvl==$lvl+1;
$XP =="225"-$cash;
}
else if ($cash=="270"){
$lvl==$lvl+1;
$XP =="270"-$cash;
}
else if ($cash=="300"){
$lvl==$lvl+1;
$XP =="300"-$cash;
}
else if ($cash=="350"){
$lvl==$lvl+1;
$XP =="350"-$cash;
}
else if ($cash=="400"){
$lvl==$lvl+1;
$XP =="400"-$cash;
}
else if ($cash=="450"){
$lvl==$lvl+1;
$XP =="450"-$cash;
}
else if ($cash=="500"){
$lvl==$lvl+1;
$XP =="500"-$cash;
}
else if ($cash=="550"){
$lvl==$lvl+1;
$XP =="550"-$cash;
}
else if ($cash=="600"){
$lvl==$lvl+1;
$XP =="600"-$cash;
}
else if ($cash=="650"){
$lvl==$lvl+1;
$XP =="650"-$cash;
}
else if ($cash=="700"){
$lvl==$lvl+1;
$XP =="700"-$cash;
}
else if ($cash=="750"){
$lvl==$lvl+1;
$XP =="750"-$cash;
}
else if ($cash=="800"){
$lvl==$lvl+1;
$XP =="800"-$cash;
}
else if ($cash=="850"){
$lvl==$lvl+1;
$XP =="850"-$cash;
}
else if ($cash=="900"){
$lvl==$lvl+1;
$XP =="900"-$cash;
}
else if ($cash=="1000"){
$lvl==$lvl+1;
$XP =="1000"-$cash;
}
if ($tid) {
$db->query('UPDATE '.$low_prio.$db->prefix.'users SET xp&lvl WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());
redirect('viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $lang_post['Post redirect'].'<br />You have gained '.$cur_posting['cm_cpp'].'XP');
} else if($fid) {
$db->query('UPDATE '.$low_prio.$db->prefix.'users SET xp&lvl WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());
process_uploaded_images($new_pid);
redirect('viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $lang_post['Post redirect'].'<br />You have gained '.$cur_posting['cm_cpt'].'XP');
}
Any Ideas?