Moving is broken when loading from the save file
Closed this issue · 7 comments
When you try to move to an exit when you just loaded from the save file, it says there is no exit to [direction]
. The only way to get out of it is to type say xyzzy
. Then everything works normally again.
The reason why this happens is because when you reload, 'locToGoTo' is set to None.
Because of this, when using Player.go, locToGoTo makes the condition flow go to the final else statement.
However, using say xyzzy
assigns a value to locToGoTo, allowing for the function to be used again.
I'd just like to say that this issue is the most bizzare issue I've seen in the entire project.
If you mean it's bizarre because of the title, that's a mistake with the hub
command (which you should use if you don't already)
I looked into it some more:
self.locations.exits[direction]
Throws a key error.
I'll fix it in a bit
Well, I can't figure it out. Will you try to fix this?
locToGoTo undefined? Make it defined!
Otherwise, pass.
That didn't fix it. There are no more error messages, but now it just moves you nowhere when you try to move.