>Hi Bernard.. > >Here is an example that works... > >DO WHILE > *-- Wait 0.5 second for a keypress > nWait = INKEY(0.5,"H") > IF nWait <> 0 > *-- Key pressed, EXIT loop > EXIT > ENDIF > > Some code.... > >ENDDO >
My code is similar. The problem is that FPW2.6a comes up with this error when the INKEY() function itself is evaluated nWait = INKEY(0.5,"H")
"Function argument value, type, or count is invalid" (ERROR#11)
So there is no use evaluating the nWait variable to see if it is <> 0 as the program bombs at the line where there is INKEY(), before returning any result to nWait!!