update: it's because i was trying to enter the wrong gym. Maybe you could add some kind of message like "fight the gym leaders in order" whenever someone tries to enter the wrong gym