Looks like I worked it out
the ' ' marks in if ($user['usergoupid'] != "55" or $user['usergoupid'] != "56" ) should not be there it should read
if ($user[usergoupid] != "55" or $user[usergoupid] != "56" )
the code I'm using on my site that works is
PHP Code:
if ($DoDebug==1) echo "<br/>VSa PayPal Donate - Attachments";
if ($user[usergroupid] > "55")
{
$attq = $vbulletin->db->query_read("SELECT
SUM(amount) as myamount
FROM " . TABLE_PREFIX . "vsa_ppdonate
WHERE confirmed=1 AND userid=".$user['userid']."
GROUP BY userid
");
if ($vbulletin->db->num_rows($attq) > 0 )
{
$att = $vbulletin->db->fetch_array($attq);
$xperience['count_user_vppd'] = $att['myamount'] * $vbulletin->options['xperience_points_vppd'];
$xperience['count_user'] += $xperience['count_user_vppd'];
}
}