I’m making some sort of a mistake that’s bound to be ridiculously obvious in hindsight, I’d wager.
In the following code snippet’s first statement, I’m able to verify that
current_assignments[ship.id].destination is, indeed, a tuple that appears to be a standard position. Obviously, in the second, ship.position is also a standard position.
glo.Misc.loggit('core', 'debug', " -* destination: " + str(glo.Variables.current_assignments[ship.id].destination)) glo.Misc.loggit('core', 'debug', " -* target's direction: " + game_map._get_target_direction(ship.position, glo.Variables.current_assignments[ship.id].destination))
Why, then, do I have the interpreter telling me that (as far as I can deduce) I’m not using the right kind of arguments to this method, with the following error message?
[error]  [P1] File “/home/sprite/src/py/haliteIII/nightMiner/custom_routines/seek_n_nav.py”, line 140, in scoot
[error]  [P1] current_assignments[ship.id].
[error]  [P1] File “/home/sprite/src/py/haliteIII/nightMiner/hlt/positionals.py”, line 75, in directional_offset
[error]  [P1] return self + Position(*direction)
[error]  [P1] File “/home/sprite/src/py/haliteIII/nightMiner/hlt/positionals.py”, line 84, in add
[error]  [P1] return Position(self.x + other.x, self.y + other.y)
[error]  [P1] TypeError: unsupported operand type(s) for +: ‘int’ and ‘tuple’
If it makes any difference, I’ve also run into the error, previously, that I was trying to add an ‘int’ with ‘NoneType’, as well. I don’t recall the exact code changes from that point, though, so it’s almost certainly moot right now.
Thank you very much for any pointers in the right direction; I will make certain to slam my forehead into the desk when it becomes apparent how obvious my mistake should have been.