Do you have
Code:
INCLUDE "modedefs.bas"
at the top of you program?