in reply to i cant see whats wrong with this:

The problem is simple. You are using "else if" it should be "elsif".

LeGo