ditto what gray said. mine did something similar right in the middle of a ride, turned out I had snapped the gear lever at the bolt and it was just about to fall off completely !
another thing to check is the gear selector drum spring - it's behind the left cover near the kick starter shaft. when it breaks you can't select any gears, you're stuck in the gear you were in when the spring broke. simple to fix, don't need to split the cases, just pull the side cover.
cheers, andrew