I'm probably missing something really obvious here but I just can't see why it's crashing. Any help is appreciated.
Code: Select all
function AwardXp(XpToAward)
XpToAward = math.floor((XpToAward / 4) + 0.5)
party:getChampion(1):gainExp(XpToAward)
party:getChampion(2):gainExp(XpToAward)
party:getChampion(3):gainExp(XpToAward)
party:getChampion(4):gainExp(XpToAward)
end
Level = 2
XP = 100 * Level
AwardXP(XP)