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 / Problem with the Huge Dungeon tutorial.

Author
Message
baps
21
Years of Service
User Offline
Joined: 29th Jul 2003
Location:
Posted: 29th Jul 2003 18:26
Greetings.

I've just started playing with Darkbasic Pro. working my way through the tutorials to get to grips with the IDE, syntax, functions etc. and have encountered a couple of problems perhaps you guys could help me with.

The first thing that is causing some setbacks is the debugging facility. I can't seem to get breakpoints or the step through debugging to work and am therefore having problems finding where errors lie in my code. Some tips on how to use these functions perhaps?


I have successfully ran through most of the preceding tutorials up until the Huge Dungeon one where I encountered a problem running the finished executable. The program simply terminates once it begins and without the use of the debugger etc. I can't seem to find where the problem lies. I am pretty confident that I have entered the code correctly from the tutorial, correcting carriage returns where necessary etc. and am getting no compilation errors but this problem still arises. Does anyone know any factors which I may look into which could cause such a problem?

Any hints, tips or help would be greatly appreciated.

Baps.
baps
21
Years of Service
User Offline
Joined: 29th Jul 2003
Location:
Posted: 29th Jul 2003 18:45
I think I have narrowed the problem down the the loadmap function. Please see the attached code for the function I am using.

Since I have commented out the call to the function it appears to be the function itself that is causing the program to prematurely terminate.

Any thoughts would be appreciated.

Baps

Kanzure
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location:
Posted: 29th Jul 2003 18:49
Quote: " read byte 1,tmp
map$(x,y)=chr$(tmp)
"


Why is it a variable array? Isn't it for map data?

baps
21
Years of Service
User Offline
Joined: 29th Jul 2003
Location:
Posted: 29th Jul 2003 19:05
It is map data, yes. Like I said this is straight from the tutorial on the DarkBASIC site.

http://www.darkbasicpro.com/tutorials.php

The one called Huge Dungeon.

You think it should be used differently?

Baps.

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 29th Jul 2003 21:29
what version are you patched up to.

I just ran huge dungeons in 5.1 and it ran ok. I have to upgrade to 5.2 beta to test that version.

Bloodshot
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location: United Kingdom
Posted: 29th Jul 2003 22:21 Edited at: 29th Jul 2003 22:44
Quote: "
"


baps, your For Loop code is reading the map file wrong in the source code you provided!

Going by what you've supplied, I've made the necessary changes here:

Login to post a reply

Server time is: 2024-09-20 17:52:27
Your offset time is: 2024-09-20 17:52:27