Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Input makes Illegal Operation

Author
Message
Zooker
21
Years of Service
User Offline
Joined: 27th Oct 2002
Location: United States
Posted: 28th Jan 2003 01:33
Below is an input routine I wrote and I can't find why it gives and illegal operation and says it makes a page fault in DB.EXE. Can anybody see what's wrong?

set display mode 800,600,16
Q$="Enter Password Now... "
Cls rgb(110,69,255)
Do

Do
A$=""
rem A$=inkey$()
If TypeInp=0
IF KeyState(1)=1 then ExitFunction
IF A$="" then exit
IF KeyState(14)=1 then exit
EndIf
If TypeInp=1
IF KeyState(1)=1 then ExitFunction
IF KeyState(14)=1 then exit
IF KeyState(2)=1 then exit
IF KeyState(3)=1 then exit
IF KeyState(4)=1 then exit
IF KeyState(5)=1 then exit
IF KeyState(6)=1 then exit
IF KeyState(7)=1 then exit
IF KeyState(8)=1 then exit
IF KeyState(9)=1 then exit
IF KeyState(10)=1 then exit
IF KeyState(11)=1 then exit
IF KeyState(12)=1 then exit
IF KeyState(52)=1 then exit
IF A$"" then Exit
EndIf
If TypeInp=2
IF KeyState(1)=1 then ExitFunction
IF KeyState(14)=1 then exit
IF KeyState(30)=1 then exit
IF KeyState(48)=1 then exit
IF KeyState(46)=1 then exit
IF KeyState(32)=1 then exit
IF KeyState(18)=1 then exit
IF KeyState(33)=1 then exit
IF KeyState(34)=1 then exit
IF KeyState(35)=1 then exit
IF KeyState(23)=1 then exit
IF KeyState(36)=1 then exit
IF KeyState(37)=1 then exit
IF KeyState(38)=1 then exit
IF KeyState(50)=1 then exit
IF KeyState(49)=1 then exit
IF KeyState(24)=1 then exit
IF KeyState(25)=1 then exit
IF KeyState(16)=1 then exit
IF KeyState(19)=1 then exit
IF KeyState(31)=1 then exit
IF KeyState(20)=1 then exit
IF KeyState(22)=1 then exit
IF KeyState(47)=1 then exit
IF KeyState(17)=1 then exit
IF KeyState(45)=1 then exit
IF KeyState(21)=1 then exit
IF KeyState(44)=1 then exit
IF KeyState(12)=1 then exit
IF KeyState(52)=1 then exit
IF KeyState(4)=1 then exit
IF KeyState(5)=1 then exit
IF KeyState(6)=1 then exit
IF KeyState(7)=1 then exit
IF KeyState(8)=1 then exit
IF KeyState(9)=1 then exit
IF KeyState(10)=1 then exit
IF KeyState(11)=1 then exit
IF KeyState(12)=1 then exit
IF KeyState(52)=1 then exit
IF A$"" then Exit
EndIf
Loop
If Scancode()14
Answer$=Answer$+A$
EndIf
If Scancode()=14
AL=Len(Answer$)
Answer$=Left$(Answer$,AL-1)
Ink Rgb(110,69,255),rgb(110,69,255)
EndIf
QL=Len(Q$)
Text 20,570,Q$
Text 20+QL*8,570,Answer$+"_"
If Returnkey()=1 then exit
Loop

Text 100,100,"Out of Loop"
sleep 200
suspend for Key

end
It took Years to Make Me this Stupid!

Login to post a reply

Server time is: 2024-05-05 03:26:54
Your offset time is: 2024-05-05 03:26:54