When defining a type, it is not uncommon to forget typing range. Simply add the keyword and it will work.
type percent is range 0 .. 100;