Rather than use a db query to get the browsing user's reputation, I would simply use:
PHP Code:
$vbulletin->userinfo['reputation']
Thus, your code becomes:
PHP Code:
$RUserMinus = $vbulletin->userinfo['reputation'] - 1;
$vbulletin->db->query_write("UPDATE user SET reputation=" . $RUserMinus . " WHERE userid=".$vbulletin->userinfo['userid']) or die (mysql_error());