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 / Crazy Unexplained errors

Author
Message
Cretinous
19
Years of Service
User Offline
Joined: 10th Mar 2005
Location:
Posted: 5th Jul 2006 13:56
Hi, I wouldn't normally ask but I'm on a tight deadline and the debugging/walk-through mode of my DBpro have broken.

I have this code and in theory it should display things fine but it's not. Also it it fails to open files even though the filename and directory etc... are perfect.

The program is attached it's only 227kb

please help asap or i'm screwed

[url=http://www.cretinous.co.nr/]
[/url]

Attachments

Login to view attachments
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 5th Jul 2006 14:37
It's doubtful anyone will just download a project and debug based on the info provided.

Quote: "I have this code and in theory it should display things fine but it's not"

What things? What isn't it displaying? What is it displaying? What part of the cod eis responsible for displaying?

What release of DB Pro? What have you done to investigate so far? What are the results of your tests?



Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 5th Jul 2006 14:42
I see a bunch of silver buttons. Now what?

I doubt you can draw me/60 by hand, so you REALLY can't draw ME/1, can you? Okay, you do that. Just tell me when you're done, I'll be someplace else having a life.
Cretinous
19
Years of Service
User Offline
Joined: 10th Mar 2005
Location:
Posted: 5th Jul 2006 14:44
it a "little" app that interprets a text file and displays stuff that it has interpreted abit like how a browser interprets a html file. except the positioning of everything is preset.

so if it reads "media\bg.jpg" it will load up and position bg.jpg

the problem is that some of the loaded up stuff is being displayed or when the program tries to find the file to interpret it fails

I have all the latest upgrades for DBpro. I've tried all I can think of (e.g. making variables permentant instead of loaded from file etc...)
sorry for the poor explanation before i was in a rush.

[url=http://www.cretinous.co.nr/]
[/url]
Cretinous
19
Years of Service
User Offline
Joined: 10th Mar 2005
Location:
Posted: 5th Jul 2006 14:44
Click on one of the circles and that is the "interpreted" file

[url=http://www.cretinous.co.nr/]
[/url]
Cretinous
19
Years of Service
User Offline
Joined: 10th Mar 2005
Location:
Posted: 5th Jul 2006 16:23
Ok ignore all the crazy errors with the _load_page section
I completely rewrite that part of the code. So it works (ish) now.


If anyone still cares its when I try and load a file to load in to a page. media\template.T2S works fine, but for some reason it keeps saying that media\ElecNan.T2S doesn't exist even though It does. And yes I have checked spelling etc... in the code

I'm not gonna upload it again because theres no point.

[url=http://www.cretinous.co.nr/]
[/url]
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 5th Jul 2006 16:40
Quote: "If anyone still cares its when I try and load a file to load in to a page. media\template.T2S works fine, but for some reason it keeps saying that media\ElecNan.T2S doesn't exist even though It does. And yes I have checked spelling etc... in the code"


After checking I know thats wrong: The file is in .txt format and not .T2S format.
Cretinous
19
Years of Service
User Offline
Joined: 10th Mar 2005
Location:
Posted: 5th Jul 2006 17:13
it doesn't matter it will load any file and try nad interpret it. I call it a .T2S file so I can sell of an editor to idiots that havn't worked off it's just a normal text file called something new.

[url=http://www.cretinous.co.nr/]
[/url]
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 5th Jul 2006 19:56
well, the thing is that it makes an huge difference if you call a file a .txt file or a .T2S file if you want it to load the file. But, however (after checking your code once again), I think I missunderstood the method of how you loaded the file. I thought you just did like this:
, and then it would be wrong. I confess I find your code a bit confusing, but its not mine. What I would do is to create a separate function that make a list over all the .T2S files and then load them from that list.
Cretinous
19
Years of Service
User Offline
Joined: 10th Mar 2005
Location:
Posted: 6th Jul 2006 12:14
It wasn't the open to write bit. But following your advice I wrote 2 functions that A) logged all the .T2S files in the media folder and b) loaded them when called and its working fine now.

Sorry about the code being hard to follow. I was in a bit of a rush


Thanks for all the help

[url=http://www.cretinous.co.nr/]
[/url]
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 6th Jul 2006 12:17
No problem.
Cretinous
19
Years of Service
User Offline
Joined: 10th Mar 2005
Location:
Posted: 6th Jul 2006 16:10 Edited at: 6th Jul 2006 16:14
Ok problems back or a new one I really don't know???

The new download is on this post. Don't worry I've cleaned it up (abit) this time. Ok the problem now is that i can load template.TS2 (selected in nodefiles.txt) but when i load ElecNan.T2S that is now exactly the same it crashes saying iy can't load the image on line 63

i have no idea why it reads one file one way and another different when they are exactly the same (execpt name)

Please help ASAP

btw i removed example.avi because it was 20Mb

[url=http://www.cretinous.co.nr/]
[/url]

Attachments

Login to view attachments
Mr X
18
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 7th Jul 2006 13:13
It works fine for me. But you should know one thing with dark basic. Its not entierly accuret. When it said that it was unable to load the image on line 63, it propoble meant line 61, or possibaly line 75.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 7th Jul 2006 14:56
Main problem is your confusing everything with node numbers. Because you have dimmed 25 that gives items 0 to 25 (ie 26 items)

Your nodes.dba sets up nodes 1 to 25

Your two text files have names and filenames for 0 to 25 where 1 is supposed to the Elec one.

So if you click on node 1, mouse=1 when going to load page, then you reduce it by 1 to set current node which will now be 0, you then loop through contents of nodefiles from 1 to current node (0) so it never reads file$

So basically you need to rationalise your numbering system

Boo!
Cretinous
19
Years of Service
User Offline
Joined: 10th Mar 2005
Location:
Posted: 9th Jul 2006 14:30
Ok thanks alot it was a real help

[url=http://www.cretinous.co.nr/]
[/url]

Login to post a reply

Server time is: 2024-09-25 03:35:06
Your offset time is: 2024-09-25 03:35:06