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 / The New DBPro...halp!

Author
Message
nonZero
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 7th Jan 2012 10:37 Edited at: 7th Jan 2012 11:15
Back Story (optional read):


Here's my problem: #INCLUDE. In the old DBPro, I used the following code:



without a problem. Now in the new DBPro when I hit F5, nothing happens until I comment this part out. The only solution seems to be to manually add the file to the project (which kinda defeats the purpose of having once central function file that's usable in all my projects, including test code for which I don't make a project).

So, can anyone explain this? Is this meant to be so? Is this a bug (I really hope it is and it's fixable)? Anyway please halp!!!

EDIT: It doesn't even try to compile. I checked the source dump file and it's from yesterday (The last code I ran before trying to get #INCLUDE working AGAIN this morning).

Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 7th Jan 2012 11:11
I don't think you actually need to use the #include command to include a file if you can see it in the project tree. I think it's done automatically. So try using the functions in your other source file(s). I am suspicious though. Typically with this problem an error is reported. The other thing you could try is if the source file is in the same folder as your main file just include the name of the dba file. I don't think you need its full path.

nonZero
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 7th Jan 2012 11:39 Edited at: 7th Jan 2012 11:40
Quote: "...if the source file is in the same folder as your main file just include the name of the dba file. I don't think you need its full path."


Didn't work I'm afraid.

Quote: "I don't think you actually need to use the #include command to include a file if you can see it in the project tree."


Problem is, I can't see it in my tree. Only thing that works is if I omit #INCLUDE completely, and then add the file using the GUI. Now the whole idea of it having its own folder was I just paste the #INCLUDE code (It's on a sticky note, lol) to every new file I open. That way, I run run temp code more easily. Now it looks like I have to create a project for everytime I want to run a "quick test"
I suspect the Editor is behind it though.
Btw, it doesn't just give no error message, it doesn't even highlight the problematic line. I tried re-installing once already. Maybe I should just try again. My AV and Firewall were OFF during install and I disable them while I'm coding so it can't be that.

Tks for advice all the same, helped me eliminate things so I'm getting closer to the answer anyway.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 7th Jan 2012 12:11
Hi nonZero...

What Operating System (OS) are you using?

Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 7th Jan 2012 12:17
I see what you're trying to do now. I haven't come across this problem before. You'd think it would tell you something. I think you still get access to the old editor, what happens if you try it in the old one?

Also check that you are running the new editor as an administrator. Properties-> compatibility.

nonZero
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 7th Jan 2012 13:05 Edited at: 7th Jan 2012 15:15
@MrValentine: Win7 HP x64.

@Hodgey: IN A HYPOTHETICAL SITUATION, THIS COULD HAVE HAPPENED: Old editor works okay (I actually got it running a while ago). Sure I can edit the configz to include the new keywords too (works in the old ver) but I lose that beautiful workspace which is the new editor
I don't know how legal "modding" a TGC product is (did not read legal thingy) so the above scenario may or may not have happened, lol.
Btw, am already running with full admin privileges.

EDIT: I just tried disabling every last shred of security. Still to no avail. Seems like I'll have to put up with using the Project --> Add file thing for now. Don't like it as I'll have to create a "temp" project template for running test code and I don't like doing things that way, but I guess that's just life *sigh*

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 7th Jan 2012 17:07
Here try this

btw are you using the free edition or paid edition and is it the latest update? U77?

http://forum.thegamecreators.com/?m=forum_view&t=159609&b=2&msg=2159408#m2159408

Robert The Robot
17
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 7th Jan 2012 22:09 Edited at: 7th Jan 2012 22:10
Hmmm, this has me intrigued. I wrote a sample program to test this:

Main Source File:


Include file (created by Menu->Add New File to project)


Without the #include command, the program crashed saying "RTR_TestOne" did not exist in the main file. With the include file, I crashed with:
"The name 'RTR_TestOne' duplicated in the program inside IncludeFile.dba."

The Full source dump looked like this:

So DBP must be including the include file twice when it parses all project files.

I'm on DBP v1.0761, using the modern editor. Haven't upgraded to U7.7 yet, been out of things for a while so haven't checked if it's official or just beta yet. Anyway, just my two cents worth...

We spend our lives chasing dreams. Dark Basic lets us catch some of them.
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 7th Jan 2012 23:13
When adding files to a DBP project there's no need for the #include directive as they will get attached anyway when the project gets built. You just make sure your first file in the project is your entry point.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
nonZero
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 8th Jan 2012 09:32 Edited at: 8th Jan 2012 09:37
@MrValentine: Already running with User Access Control on "Never Notify Me". It's the first thing I do when I install windows. Before you freak:
Verbose part (reasons why) optional:



@Robert The Robot: I'm starting to suspect the rest of the DBPro environment has more authority than the compiler. If I didn't know better I'd say the editor tried to "add the source file to project" when it encountered #INCLUDE and then the compiler #INCLUDEd the file when it encoutered the command. In my problem, it doesn't even compile though. My source dump is from any previously run code.

@WLGfx:
Quote: "When adding files to a DBP project there's no need for the #include directive as they will get attached anyway when the project gets built. You just make sure your first file in the project is your entry point."

Yeah, the only way that worx is to use the project manager and add the file through that. I hate using a "point 'n click ['n drag 'n drop]" UI for anything I can rather use a command for (I grew up on DOS, in my defense). It makes me feel "secure" to see it there, in my code. I'm sad.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 8th Jan 2012 15:32 Edited at: 8th Jan 2012 15:35
Did you set DEP settings... no idea where you got the freak part came across as a bit rude to be honest...

But anyway you can use #include but you must disable DEP for all DBPRO exe's as its an advanced handler of strange file behaviour...

Before you write something odd back JUST [INSERT FRENCH WORD HERE] DO IT FIRST {english word would be bloody or bloomin lol}

EDIT

I dont know about your use of the condom method but I have never had a virus since maybe 2005-6 after I switched to Vista and stopped downloading pointless things from strange sources...
These days my hardware does my bug catching so thats why I invest in modern hardware... oh and I am on Win7x64U now...

nonZero
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 8th Jan 2012 20:06
@MrValentine:
Quote: "...no idea where you got the freak part came across as a bit rude to be honest..."

rude

That was really not my intention. Wasn't trying to come across rude at all, I thought my tone was light. When I said "Before you freak", I was making a joke because people who work/have worked in IT (I assume you do based on your knowledge) always freak when I talk about disabling my defense before I tell them why so it was like a joke coz as you're thinking it, you're reading it...Okay I'm lame, I know. Anyways... The rest was marked "Verbose part" and "optional" because I thought I ought to explain for the sake of people who happen upon this post and think "yaaaaay I'll turn it off" without adequate protection. Now when I explain things, I tend to get verbose and ramble (as I'm doing now, lol). So to counteract that droning on, I usually throw in something playful and humorous - like the 50kb Photoshop Installer joke. But if you took offense, I'm sorry. I try to check if my posts contain anything that may be misinterpreted (either in the wording or overall tone) but I don't always see everything. I still don't see anything offensive in my post, I'll be honest, but that's my perspective and we live in a subjective world so I won't rule out my own bias when re-reading my post. Perhaps, give my post another look through. We, including myself, can so easily jump to conclusions. If you still find it offensive, you've every right to that view and I won't hold it against you, neither will I your politics/religion/or any other viewpoint. Just know I didn't mean it that way. I would never intentionally insult another member unless they'd insulted me first and even then I would be courteous about it. Please think on this. If you need any additional proof of my sincerity (another optional read):

Optional read was < rest of post for once.

Quote: "Before you write something odd back..."

Waaaaaaaay too late, lol
But yeah DEP was disabled for all but Windows services. Even tried turning it on and excluding every TGC exe and still get that problem. Well, it's not the end of the world. I adapt quickly and have gotten used to clicking things over the years so I can get used to this new method(coding pun) of including files using the project manager. Tks

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 8th Jan 2012 20:16
Hehehehe wasnt offended just pointing out lol

and dang busted as a FF fan... I wonder what gave that away... lol I did lol at the photoshop exe size rofl...

Well yeah I figured it was a small thing to click into lol...

Anyway nice to meet you haha...

Ahh just noticed... I do not think you have completely disabled UAC cant check right now but ensure the slider is all the way down...

And also make sure you check your bios for DEP enabled... it has to be turned on in the CPU feature set if it supports it.

nonZero
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 8th Jan 2012 20:58 Edited at: 9th Jan 2012 08:40
Quote: "I do not think you have completely disabled UAC cant check right now but ensure the slider is all the way down"

All the way. Won't go further. I pushed and pushed.

Quote: "And also make sure you check your bios for DEP enabled..."

I am an idiot
Completely forgot about the BIOS!!! My CPU does support it. Will check that out tomorrow. Tks

EDIT:
Tried this morning. My bios doesn't give me access to ANY hardware features, cpu or otherwise. Some limitation's aren't surprising considering this is a laptop but I was shocked by just how limited this BIOS is. The following options are available:


Anyhow, looks like I'm stuck now unless there are "extra hidden options" that can be unlocked (I've heard some OEMs intentionally make most of the bios inaccessible to the user but can't confirm it. I'm a PC guy, not a laptop guy so I dunno much in this field. Only got this for mobility during the transition phase of my emigration).

nonZero
13
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 10th Jan 2012 07:43
Don't normally double-post, normally edit previous and add to it, but this is a special case...

Have moved this thread to the bug reports section and re-posted it as a bug so let's see what the the guys on top have to say. Even if DEP is causing it, which I don't think it is anymore (I've done some looking into DBP's workings), it's still technically something that needs to be considered for future releases/patches.

Anyway, the thread is now at
http://forum.thegamecreators.com/?m=forum_view&t=193263&b=15
So GOTO there and please don't make any further posts here (for continuity's sake and to prevent forum clutter). Rather post on the Bug Report thread.

Requesting thread lock from the first mod to read this, thanks.

Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 11th Jan 2012 20:53
Had to include my comment before the lock.

I was baffled by this at first as well, but found the solution here on the boards to be that you can only include includes by including them in the solution explorer/project tree.

Indeed #include does not include your file, but tries to duplicate it.
Seems like the #include command would be overrode at the compiler level to prevent it from trying to include the file.

I find the solution explorer/project tree to be better since you can pop includes in and out without typing their directory address.
Works like a charm, but I also agree the manual option should work for those who like to manually put it in.

Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 13th Jan 2012 02:12
Quote: "Indeed #include does not include your file, but tries to duplicate it."

That's what it's supposed to do isn't it?

I tried it out and for me the precompiler doesn't even find my included files. I'd guess it is considered obsolete thanks to that standard approach of including files to the project instead, but I agree that it could be useable when testing something.
Also since the keyword exists one could assume that it should indeed work.


"Why do programmers get Halloween and Christmas mixed up?"

Login to post a reply

Server time is: 2024-11-27 18:00:23
Your offset time is: 2024-11-27 18:00:23