Urr... the PAC version, at least, of my Equipment Set's script causes a stack error when either a new game or continue scene is called after pressing F12, but not after the To Title command in the Game End section of the menu is used. The error is:
Script 'PAC Equipment Sets' line 264: SystemStackError occurred.
stack level too deep.
So, of course, we open up the editor to see why this is happening. The code around there is:
class Game_Actor < Game_Battler
#A whole bunch of other stuff...
alias pacman_eq_bonus_maxhp maxhp
#Some more stuff...
def maxhp
default_val = pacman_eq_bonus_maxhp #LINE 264
final_val = default_val
n = 100
if @bonus_set
if !@bonus_set.empty?
for j in 0...@bonus_set.size
for i in 0...@bonus_set_pieces[j]
if Set_Bonus[@bonus_set[j]][i] != nil
if Set_Bonus[@bonus_set[j]][i][0] == 5
n += Set_Bonus[@bonus_set[j]][i][1]
end
end
end
end
final_val *= n
final_val /= 100
else
final_val = default_val
end
end
return final_val
end
#More stuff...
end
Now, the stuff around that method is very, VERY similar to that method, e.g. the agi method is:
def agi
default_val = pacman_eq_bonus_agi
final_val = default_val
n = 100
if !@bonus_set.empty?
for j in 0...@bonus_set.size
for i in 0...@bonus_set_pieces[j]
if Set_Bonus[@bonus_set[j]][i] != nil
if Set_Bonus[@bonus_set[j]][i][0] == 4
n +=Set_Bonus[@bonus_set[j]][i][1]
end
end
end
end
final_val *= n
final_val /= 100
else
final_val = default_val
end
return final_val
end
So I really have no idea what's causing the stack error in the maxhp method if the agi method is perfectly fine and error free. If nobody knows what's going on, is there a way to escape a stack error?