So I have found sometimes I get a blank error message when editing scripts. I assume it means "you messed up so bad even the engine doesn't know what's wrong":
But I'm curious if there is actually an explanation? It generally makes troubleshooting a bear unless I've paid attention to the changes I've made. Is it related to the stack?
I noticed I've seen it appear with events most often, but this current case is related to gaining EXP at the end of battle, and I believe it may be a recursion issue.
Also, the problem script, if someone would like to help. I am trying to figure out how EXP is calculated with this battle script, it seems to be completely wrong--my actor is gaining way more exp than the enemy provides--so I was trying to fix it, rather unsuccessfully:
The phase 5 calls "gain_exp" after battle like so:
And gain_exp
def gain_exp
exp = exp_gained
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
last_level = actor.level
actor.exp += exp
if actor.level > last_level
@status_window.level_up(i)
end
end
end
return exp
end
#--------------------------------------------------------------------------
def exp_gained
# For each enemy in the troop
for enemy in $game_troop.enemies
# Add their exp to the pool
exp += enemy.exp
# Old line: exp = exp.nil? ? enemy.exp : exp + enemy.exp
end
if EXP_SHARE
actor_number = 0
for actor in $game_party.actors
actor_number += 1 unless actor.cant_get_exp?
end
exp = exp / [actor_number, 1].max
#exp = exp / [actor_number, 1].max
end
return exp
end