when I run my forgottten server I got this issue
This is my creature.lua
How can I solve the error? thanks in advance
[Warning - Events::load] Can not load script: creature.lua
data/events/scripts/creature.lua:11: 'end' expected (to close 'function' at line 9) near 'if'
This is my creature.lua
function Creature:onChangeOutfit(outfit)
return true
end
function Creature:onAreaCombat(tile, isAggressive)
return true
end
function Creature:onTargetCombat(target)
return RETURNVALUE_NOERROR
if target:getName() == "Trainer" then
target:registerEvent("EventDPS")
end
How can I solve the error? thanks in advance