Incredibly stupid question
Incredibly stupid question
So back in the day when I was still in Middle School I could write programs in computer class while everybody else was using "Mario Teaches Typing," and I could write games and programs that helped me cheat on tests and almost anything else you want to name. Since then I hadn't had much reason to know how anymore, but I still managed to hold on to a few scraps of what I knew. I decided to looked into some tutorials on it anyway which brought me here, but nothing I've done so far has worked. I've copied codes from tutorials verbatim from many sites, including this one, and almost none of them have worked excepting a small worthless few. I prefer to try to write the codes myself and figure them out after learning what the commands mean, but when I tried one of the "game" tutorials from a link on this site, even when I typed it exactly as it was on the page it said that LOCATE was an illegal function. When I typed the "How do I use arrow keys..." code examples from the FAQ page, nothing worked except for escape and a few sporatic buttons when I changed it just to see what would happen. Yeh I know this is a long question with no question marks, but any ideas?
I'm starting to think that there's something wrong with my QB. About every other time I run a simple program I get a screen that looks like a n old frozen NES. I tried running some of the games off of the download page and it was hit or miss...some worked, some didn't, and some worked the 5th try but not the 4th....Until today I thought I was an intelligent person.
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
Which version of QB do you have? Where did you get it from? Maybe it's a simple question of a quick library that isn't included or loaded with your QB that should be. Maybe it's a directory that isn't specified that should be for include files or others.
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
I scrapped the version I had (which I've kept on a disc since I was in high school) and used a version from a link on this site. Same response. I tried using the LOCATE example from the help file and that works, but nothing else does. LOCATE is a command that I'm familiar with and it's always worked in the past the few times I've used it. I'm definitely not claiming to be a genius by any means but I've always been very good with this type of programming. I don't understand...
Alright so maybe I wasted your time with my initial question, but I've decided to scrap the version I have, which I believe is 1.1, and get 4.5 or 7.1. So which one would anybody recommend? I know 7.1 is the newer and last version, but I've heard that 4.5 is better for some reason to some people. I don't know the difference per se, but I know sometimes "improvements" are not necessarily improvements. Any suggestions?
-
- Veteran
- Posts: 703
- Joined: Sun Nov 14, 2004 7:36 am
- Contact:
It depends on the size of the program you're planning to make.
QB 4.5 has a syntax that's much closer to the QBasic 1.1 you've been using. The PDS 7.1 is close to, it offers more commands but essentially it's the same as QB 4.5 cept some commands might have changed, some added.
The reason the size of your project matters here is that the PDS has the ability to generate overlays so that your program could be up to 16Mb in size ( 64 overs of 256 Kb in size) where QB 4.5 doesn't allow overlays so your program would be limited in size to conventional memory. So it really depends on the size of your project. QB 4.5 is usually the prefered environment for most game developers (because if you can make it work in 4.5 it would work on anything else available . Choice is yours. Have you considered VB-DOS professional? Another good environment too.
QB 4.5 has a syntax that's much closer to the QBasic 1.1 you've been using. The PDS 7.1 is close to, it offers more commands but essentially it's the same as QB 4.5 cept some commands might have changed, some added.
The reason the size of your project matters here is that the PDS has the ability to generate overlays so that your program could be up to 16Mb in size ( 64 overs of 256 Kb in size) where QB 4.5 doesn't allow overlays so your program would be limited in size to conventional memory. So it really depends on the size of your project. QB 4.5 is usually the prefered environment for most game developers (because if you can make it work in 4.5 it would work on anything else available . Choice is yours. Have you considered VB-DOS professional? Another good environment too.
When God created light, so too was born, the first Shadow!
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
MystikShadows
Need hosting? http://www.jc-hosting.net
Interested in Text & ASCII development? Look no further!
http://www.ascii-world.com
So I figured out the arrow key thing. In the "QBFaq" section the first example reads:
DO
A$ = INKEY$ 'Get Key
IF A$ = CHR$(0) CHR$(72) THEN PRINT "You pressed up!"
IF A$ = CHR$(0) CHR$(80) THEN PRINT "You pressed down!"
IF A$ = CHR$(0) CHR$(75) THEN PRINT "You pressed left!"
IF A$ = CHR$(0) CHR$(77) THEN PRINT "You pressed right!"
IF A$ = CHR$(27) THEN END '<---ESC button
LOOP
It's just missing the addition symbols between chr$(0) and chr$(?), respectively. Just thought I'd point that out.
I know this is all easy stuff but hey...it's been a long time....
DO
A$ = INKEY$ 'Get Key
IF A$ = CHR$(0) CHR$(72) THEN PRINT "You pressed up!"
IF A$ = CHR$(0) CHR$(80) THEN PRINT "You pressed down!"
IF A$ = CHR$(0) CHR$(75) THEN PRINT "You pressed left!"
IF A$ = CHR$(0) CHR$(77) THEN PRINT "You pressed right!"
IF A$ = CHR$(27) THEN END '<---ESC button
LOOP
It's just missing the addition symbols between chr$(0) and chr$(?), respectively. Just thought I'd point that out.
I know this is all easy stuff but hey...it's been a long time....