Stack overflow error
Posted: Fri Dec 20, 2013 10:47 am
So I'm using a script to compare lvls of party members and then match them but I'm getting a stack overflow error
That means the script is repeating over and over right, into infinity. Heres my script.
If I'm thinking about this right then shouldn't it stop once the levels equalize? In the editor it will match the levels and then everythings fine for a a couple of seconds before I get the error.
How can I fix this?
That means the script is repeating over and over right, into infinity. Heres my script.
Code: Select all
function LvlComp()
if party:getChampion(2):getEnabled()==true then
repeat
OrdinalScript.getChampionWithOrdinal(2)
:levelUp()
until OrdinalScript.getChampionWithOrdinal(1):getLevel()== OrdinalScript.getChampionWithOrdinal(2):getLevel()
endHow can I fix this?