my guess is your switch statement has code running before it that walks and doesnt return / break so its walking somewhere then running that switch statement and logging walk to edgeville
understandable way to think but no, the problem in your code is probably just conditional like an if statement that checks if bot has gold walk to ge that doesnt return and runs both walk to ge and edgeville in the same loop
the alternative to it being a problem with your code is a problem with dreambot, which hundreds of users would notice