vaendryl / Sunrider

source code of the visual novel 'Sunrider'
http://sunrider-vn.com/
41 stars 21 forks source link

get_all_in_radius crash #79

Closed vaendryl closed 9 years ago

vaendryl commented 9 years ago
  File "game/classes.rpy", line 1887, in AI_basic_loop
    self.AI_move_towards(self.target)
  File "game/classes.rpy", line 1942, in AI_move_towards
    move_range = get_all_in_radius(self.location,max_move_distance)
  File "game/functions.rpy", line 1019, in get_all_in_radius
    x, y = loc
TypeError: 'NoneType' object is not iterable
vaendryl commented 9 years ago

UPDATE: errors occur personaly to me when enemy spellcasters trying to restore their allied ships. not when debuffing my ships.

EnderShadow commented 9 years ago

I think I fixed this. Although I forgot to specify that I fixed it in the commit.

EnderShadow commented 9 years ago

Is it possible that self.location can be None and that you need to use old_spot instead at line 1942?

vaendryl commented 9 years ago

that does seem safer, though I don't see how it could've moved between old_spot being set and this getting called. I've been adding some failsaves regardless