Zekallinos
Sponsor
Sorry if this has been asked before, but I didn't find any satisfactory answer with all search means for...an hour? It's getting annoying...for a small thing.
So basicly there is this :
NoMethodError Occurred
undefined method 'x' for Nil:NilClass
This problem doesn't happen if I replace "i" by an actual number. Which is not a solution.
So basicly there is this :
Code:
for i in 0..$numberenemy
@eventx = $game_map.events[i].x #<--- it crashes here
@eventy = $game_map.events[i].y
if $game_player.x - @eventx.abs < 14
#do something
elsif $game_player.y - @eventy.abs < 11
#do something
end
end
NoMethodError Occurred
undefined method 'x' for Nil:NilClass
This problem doesn't happen if I replace "i" by an actual number. Which is not a solution.