An opening admission - I am not a scripter, so I expect the mistake to be pretty basic.
I have a skill where the damage formula is too long to fit into the formula box. So I came up with this (where has the Code icon gone?).
# This has 3 effects
# Heal (always) at a cost of 5MP (set in data base)
# If the ally has Poison, remove Poison at the cost of 3MP
# If the ally has Venom, remove Venom at the cost of 10MP
#
#
class Game_Battler < Game_BattlerBase
def whistle_heal(a, b)
if b.state?(2); b.remove_state(2); a.mp-=3
end
if b.state?(57); b.remove_state(57); a.mp-=10
end
b.hp+=50
end
end
That version takes the 5MP and does nothing
Version 2
class Game_Battler < Game_BattlerBase
def whistle_heal(a, b)
if b.state?(2); b.remove_state(2); a.mp-=3;
if b.state?(57); b.remove_state(57); a.mp-=10;
b.hp+=50
end
end
That gives the error

So does putting the mp requirements onto a new line each, and/or taking out assorted semi-colons.
Can anyone sort this out please?
Thanks.
I have a skill where the damage formula is too long to fit into the formula box. So I came up with this (where has the Code icon gone?).
# This has 3 effects
# Heal (always) at a cost of 5MP (set in data base)
# If the ally has Poison, remove Poison at the cost of 3MP
# If the ally has Venom, remove Venom at the cost of 10MP
#
#
class Game_Battler < Game_BattlerBase
def whistle_heal(a, b)
if b.state?(2); b.remove_state(2); a.mp-=3
end
if b.state?(57); b.remove_state(57); a.mp-=10
end
b.hp+=50
end
end
That version takes the 5MP and does nothing
Version 2
class Game_Battler < Game_BattlerBase
def whistle_heal(a, b)
if b.state?(2); b.remove_state(2); a.mp-=3;
if b.state?(57); b.remove_state(57); a.mp-=10;
b.hp+=50
end
end
That gives the error

So does putting the mp requirements onto a new line each, and/or taking out assorted semi-colons.
Can anyone sort this out please?
Thanks.

