So im working with Blizz-ABS and everything is working fine apart from this...
I added a new monster (lizzard) and when i attack him and kill him i get 2 xp, works fine. However when a guard (npc) kills him i think its trying to give the guard some exp crashing my game...
Heres what my game looks like before the guard attacks the lizard :
Before (http://dl.dropbox.com/u/32011766/help1.jpg)
And when the guard attacks and kills the lizard :
After (http://dl.dropbox.com/u/32011766/Help2.jpg)
While this probably isn't the best solution to use and you'll have to wait until it gets fixed in the official version, add this snippet above Blizz-ABS and it should fix your problem.
Class Game_Enemy < Game_Battler
def exp=(n)
end
end
Change the line after the error (line 2055) from
bat.exp += exp if !bat.cant_get_exp?
to
bat.exp += exp if !bat.cant_get_exp? && bat.is_a?(Game_Actor)
Or:
class Game_Enemy
def cant_get_exp?
return true
end
end
all usable fixes, but the correct behavior is to only distribute EXP to the actors, thus checking for the actor as a condition is the best choice.
Of course. I was just being a smartass by providing an alternative and rather hacky solutio.
Quote from: winkio on May 15, 2012, 07:07:45 pm
Change the line after the error (line 2055) from
bat.exp += exp if !bat.cant_get_exp?
to
bat.exp += exp if !bat.cant_get_exp? && bat.is_a?(Game_Actor)
Thankyou :) worked perfectly!