The parenthesis like that don't work Lobosque.
.max is an Array method that returns the highest integer value in the array. In the case above, it'll return attacker.atk - self.pdef / 2 OR 0, whichever is higher.
In the case that attacker.atk or self.pdef is anything but an Integer, there will be problems. MagicMagor is on the right track and if you don't honestly know the answer, Lobosque, don't post.