Code:
on *:text:!XP [color:red]*[/color]:#: {
  var %alreadyxp [color:red]=[/color] $readini(Stats.ini, XP, $2)
  set %XP [color:red]$calc([/color]%alreadyxp + $3[color:red])[/color]
  writeini Stats.ini XP $3 %XP
}


I assume you're trying to add 3 with the %XP var so you need to use $calc. If not, then just change that part back.