Hi Mark
PHP Code:
global $vbulletin, $db, $userinfo;
if ($vbulletin->GPC['points'] == 0) {
continue;
}
$points = $userinfo['ipoints'];
$rep = $userinfo['reputation'];
if ($points > 0)
{
$newrep = ($rep - $points*500);
}
else
{
$newrep = ($rep - 150);
}
$vbulletin->db->query_write("
UPDATE " . TABLE_PREFIX . "user
SET reputation = " . $newrep . "
WHERE userid = " . $userinfo['userid']
);
This is what my revised code looked like, on the hook that you suggested. I'm getting a server 500 error when I try to issue a warning.
Any ideas?