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.

Newcomers DBPro Corner / Need help with code

Author
Message
Rocket Puppy
20
Years of Service
User Offline
Joined: 25th Jul 2004
Location:
Posted: 25th Jul 2004 14:51
Hi i'm fairly new to Dark Basic and was wondering if anyone could fix my loop problem,
Thanks
Rocket Puppy
20
Years of Service
User Offline
Joined: 25th Jul 2004
Location:
Posted: 25th Jul 2004 14:54
Oh, and I'm not using Dark Basic Professional (Sorry the editor isn't working)
Bean
20
Years of Service
User Offline
Joined: 23rd Mar 2004
Location: Flower Mound Texas
Posted: 25th Jul 2004 15:32
Could you elaborate a bit ....
what is you code doing ... or not doing ?
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 25th Jul 2004 16:07
bean, that would be the SOURCE button in his post


DBP_NETLIB_v1.4.3 - 65 FREE Functions * Click Logo
Bean
20
Years of Service
User Offline
Joined: 23rd Mar 2004
Location: Flower Mound Texas
Posted: 25th Jul 2004 16:13
Your correct CattleRustler (as usual)
I was just trying to narrow down his problem a bit.
His code is over 300 lines long and has several image files etc.
Rocket Puppy
20
Years of Service
User Offline
Joined: 25th Jul 2004
Location:
Posted: 26th Jul 2004 00:37 Edited at: 26th Jul 2004 00:41
when you have taken the media files from the library,you end up getting a problem with the LOOP at the very end, or at least I am. It is telling me that the Image is missing so I was wondering if anyone could help me with that little problem, it's on the very last line.

P.S. The plot is set to be printed in the beginning so you can read the code for that if that is what you are looking for. I also have a lot of remarks in there to make it eaiser to figure out the problem
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Jul 2004 06:35
Remarks help, but indentation is better. That's going to be a long job to look through the code.

In addition, what is the actual error reported by the compiler? It'd help if we knew what we were looking for

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Rocket Puppy
20
Years of Service
User Offline
Joined: 25th Jul 2004
Location:
Posted: 26th Jul 2004 09:53
it gave me the same error you get when you are missing a file from the library
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th Jul 2004 13:01
Quote: "I was just trying to narrow down his problem a bit.
His code is over 300 lines long and has several image files etc. "


But you should be able to debug without running the code.
I'd take at the code, but I'm not gonna take time to indent everything just so I can read it.

"eureka" - Archimedes
Rocket Puppy
20
Years of Service
User Offline
Joined: 25th Jul 2004
Location:
Posted: 30th Jul 2004 06:31
what do i have to do to have you guys help me? And I'm new so I'm not sure where to indent. sorry.

Thanks for any possible help
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 30th Jul 2004 08:35
instead of:


just use:



As for your loops, they are the most messed up thing I've ever seen. I couldn't even indent the code properly because things are so out of place.

Here's what you got:



It should look like(im guessing):



I deleted like 2 or 3 "endif" statements because they didn't corespond to anything.

"eureka" - Archimedes
Rocket Puppy
20
Years of Service
User Offline
Joined: 25th Jul 2004
Location:
Posted: 30th Jul 2004 08:48
It looks like it should work, but what happened with the X?:
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 30th Jul 2004 09:23
Fortunately, my indentation rules are a little more strict....



I don't know if this will solve the problem or not... because I'm not entirely sure I understand the problem in the manner you are describing it. Overall, I spotted one typo in the thing, nothing more.

Any truly great code should be indisguishable from magic.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 30th Jul 2004 09:35
The code you gave in your first post and the code in your screen shot are noticably different in the number of endif's just before the 'next X'

The code from your first post compiles without an error, once you find all the media...
Rocket Puppy
20
Years of Service
User Offline
Joined: 25th Jul 2004
Location:
Posted: 30th Jul 2004 10:20
sure it compiles okay, but play it, does it work? If so what are all the media files? It's odd because i think i have all of them.
If it works then I would appreciate it if you could tell me what all the media files are, it would help a ton.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 30th Jul 2004 10:39
These are all the media files it wanted, got them all from the DarkBasic CD.

http://sparky152.homestead.com/files/game.zip
Rocket Puppy
20
Years of Service
User Offline
Joined: 25th Jul 2004
Location:
Posted: 30th Jul 2004 10:48
I just reveted to the old source code that I posted instead of the one that Phaelax suggested I use, and now it won't let me even get past the gobskin.bmp When I run it, then if i delete the gobskin reference then it complains about the gobface!!!!!!!!!!!!!It's so frusterating! here is a picture of the last compile:
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 30th Jul 2004 10:56
Are you sure you've got all the media files in the same directory as the source file? and that you've saved your source file, cos it still compiles here.
Rocket Puppy
20
Years of Service
User Offline
Joined: 25th Jul 2004
Location:
Posted: 4th Aug 2004 13:27
k i fixed it thanks you guys!
kidsa
20
Years of Service
User Offline
Joined: 8th Dec 2003
Location: MA,usa
Posted: 6th Aug 2004 06:56 Edited at: 6th Aug 2004 06:59
sparky the link isnt working.

puppy can i have the penguin model plz? i asked for one in 3d chat and they want me to pay for one and i see you already have one

edit:after looking at the code i noticed all of the models would be good

and i forgot to post my email address its jmv290@msn.com(dont message that name i have another name thats used for msn messenger)



any language used by me will be dbpro(saves me a lot of typing)

Login to post a reply

Server time is: 2024-11-27 04:38:52
Your offset time is: 2024-11-27 04:38:52