Big Problem
Blitz3D Forums/Blitz3D Beginners Area/Big Problem
| ||
I have been working with the demo of Blitz Basic for time, and just recently got BlitzPlus. Here's my problem: Whenever I do anything that would make the user press a key to end the program, it doesn't work. Here's a quick example: Print "Hello!!" While Not KeyHit(1) Wend End I'm running the program in the BlitzPlus IDE and with debug mode on. Is my BlitzPlus copy just messed up?, or am I missing something? |
| ||
try keydown instead of keyhit |
| ||
I just tried it again. It still doesn't work. |
| ||
If that works, there something wrong surely. All my code uses keyhit(1). That's strange. Is it the latest version? |
| ||
For console mode programming (no graphics or windows) use the Input command. |
| ||
when you say it doesn't work, do you mean it doesn't quit when you press escape? Or do you mean something else? |
| ||
I have the newest version. I mean that it doesn't quit when I press the ESC key. |
| ||
Try Skid's suggestion. |
| ||
Still nothing. |
| ||
You are in console mode (text only), use the following: Print "Hello" Input("Press Enter to Quit") End |
| ||
Hmmm... seems to work fine for me... Could it maybe be your computer or something? Try it like this: while not keyhit(1) print "hello!" wend end Does that work? |
| ||
whoops, double post... |
| ||
Well, that works, but I would rather use the ESC key. Is there any way? |
| ||
I mean, the input thing works. |
| ||
No, the code you just gave me doesn't work. I tried it before. It just keeps on printing "hello!" over and over again. |
| ||
BlitzPlus console mode is designed to implement standard command line apps where stdin and stdout can be rerouted (to files etc.) hence the removal of support for single keystroke and mouse input. |
| ||
That's annoying... By the way, when I set the graphics: Graphics 800,600 It creates two windows; one with my text, and the other is just blank. |
| ||
The Print and Input commands will create a console window, use the Text command for printing to your graphics screen / window / canvas to avoid a console window being created. |
| ||
Ahhhhhhhhh...Thanks Just incase this gets annoying, I'll only ask this one more time... So there's no way to quit using the ESC key in the console window? |
| ||
There's no way to quit using the ESC key in the console window. |
| ||
Thanks... I won't ask anymore questoins now... |