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.

DarkBASIC Professional Discussion / Compile Error in DBPro

Author
Message
joejoemoe
14
Years of Service
User Offline
Joined: 2nd Jul 2009
Location: New Zealand
Posted: 5th Aug 2009 05:13
Can anyone please give me a solution
to this little problem: DBPro came up with this little corker,
[/quote]Could not close nest @ line...........
DBPro compiles the program fine, it only pops up when trying to run
the program.

JWC
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 5th Aug 2009 11:33
I'm pretty sure thats an error caused at compilation because you've forgotten an endif or a loop command (or someth like that) somewhere.

Can you provide us with your code so we can see whats wrong?

Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
Grog Grueslayer
Valued Member
18
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 5th Aug 2009 19:18
Any error in code syntax shouldn't allow it to finish compiling. Like PRoF said, we need to see some code to help.

joejoemoe
14
Years of Service
User Offline
Joined: 2nd Jul 2009
Location: New Zealand
Posted: 6th Aug 2009 00:55
Quote: "I'm pretty sure thats an error caused at compilation because you've forgotten an endif or a loop command (or someth like that) somewhere."

Hi ProF,
Its the same code as last time i am still trying to get over that ASM problem. I Put a fresh install of dbpro onto another computer and rewrote the program and got this compile error so i had the same thought as you and put in a endif to close the nest and got the same asm error again. I will E-Mail you the rewritten program to see what you think.I will also post the code for others to inspect.
Many Thanks

JWC

Attachments

Login to view attachments
joejoemoe
14
Years of Service
User Offline
Joined: 2nd Jul 2009
Location: New Zealand
Posted: 6th Aug 2009 02:56
Quote: "Any error in code syntax shouldn't allow it to finish compiling. Like PRoF said, we need to see some code to help."


This is a problem that i seem to have with dbpro is that when it compiles it comes up with a compile Error that it can't create ASM Footer.
Any ideas to solve this problem would be greatly appreciated.

Many Thanks

JWC
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 6th Aug 2009 13:31 Edited at: 6th Aug 2009 13:32
I have received the code; and am looking thru it now (Altho I'm moving house in a couple of days; so might not get chance to solve it.

I have however, sorted out the terrible indenting; and also changed all the if - then's to if/endifs to make the layout a little easier.

Once all the if's were sorted out then I get the "failed to createASMfooter::find label" error.

I shal investigate further.



Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 6th Aug 2009 14:07 Edited at: 6th Aug 2009 14:11
It's this command in the SetupGame: label



delete it and it stops the error.

I'm not sure why you're using the restore command, you don't seem to have any data statements to read from; nor any code to read from them if they were there.

Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 6th Aug 2009 14:45 Edited at: 6th Aug 2009 15:19
=PRoF=

Well spotted.

The original code refuses to compile on my machine (I'm using a beta version of Synergy) - I keep getting the mysterious UNDEFINED PARSER error that various people have complained about. However it compiles cleanly when I remove that line.

This looks like a compiler bug to me and should be reported.

Edit

Actually the following much simpler code gives the same error for me:

John Y
Synergy Editor Developer
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 6th Aug 2009 14:56
@Green Gandalf

Turn on comprehensive error reporting in the Environment Options to get the full error dump.

Synergy Editor - Available for free HERE!
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 6th Aug 2009 15:21 Edited at: 6th Aug 2009 15:26
@John Youren

Sorry - didn't refresh before editing my previous message.

I've already emailed the simple example to you with some additional comments. I'll try the full error dump now. What should I do with it?

Edit: Answered my own question. Here's the full error dump:

Attachments

Login to view attachments
John Y
Synergy Editor Developer
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: UK
Posted: 6th Aug 2009 16:28
It's a bad error message really. The third line in the full dump *should* be enough to pinpoint the error, but in this case you have to switch to showing everything to find the true cause.

Synergy Editor - Available for free HERE!
Grog Grueslayer
Valued Member
18
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 6th Aug 2009 21:15
@ Everybody:

I'm not surprised the compiler showed an error trying to find a label that doesn't exist. But it should at least tell us the line number of the error which is the compilers fault not the IDE.


@ JoeJoeMoe:

Next time upload the .dba file. The .dbpro file is only the project information (what name you want the .exe to be, attached files, and program notes). The .dba file is the actual code.

hyrichter
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 6th Aug 2009 21:40 Edited at: 6th Aug 2009 21:43
@John Y,
You'd be much better off to get the compiler's error message by looking at the file it creates in memory rather than the third line of the error report file. You need to use the OpenFileMapping and MapViewOfFile Windows APIs. The temporary "file" created is named "DBPROEDITORMESSAGE" However, the DBP compiler will only create this file if your IDE has created a window with a class name of TDBPROEDITOR. This file gives the current line number being compiled unless there's an error in which case it returns the error text.

RobK has a really good explanation of it here:
http://forum.thegamecreators.com/?m=forum_view&t=56639&b=1

CodeSurge
Version 1.0 finally released! Code your DBP projects in style. (And save the kittens!)
joejoemoe
14
Years of Service
User Offline
Joined: 2nd Jul 2009
Location: New Zealand
Posted: 7th Aug 2009 15:09
@Everyone

Thank you all very much for your input into this problem.
because i still can't get the program to compile let alone run,
i think i shall doff it in the bin along with dbpro and buy another
copy of dbpro and then start all over again.
Thay say a new broom sweeps clean we shall see.Thats unless someone comes up with a better idea.
Many Thanks

JWC
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 7th Aug 2009 15:15
Quote: "because i still can't get the program to compile let alone run,
i think i shall doff it in the bin along with dbpro and buy another
copy of dbpro and then start all over again."


What new problem are you getting now? I assume you deleted the offending line from your earlier code?
Grog Grueslayer
Valued Member
18
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 7th Aug 2009 19:40
Quote: "i think i shall doff it in the bin along with dbpro and buy another copy of dbpro and then start all over again."


Sorry if this offends you but... that's insane.

The reason why the forms exist is to help people like you that have problems... let us help you before you do something uncool.

joejoemoe
14
Years of Service
User Offline
Joined: 2nd Jul 2009
Location: New Zealand
Posted: 8th Aug 2009 00:09
@ Green Gandalf
The new error after ideleated the offending line is that it tells me that it can't build Exe or Debug.

@Grog Gruslayer
No Offence taken if it wasn't for people like you,Green Gandalf,PRoF and the rest of the forum members that try to help others where would any of us be.
The help and advise from all concerned has been highly appreciated
and most welcome Thanks.

JWC
joejoemoe
14
Years of Service
User Offline
Joined: 2nd Jul 2009
Location: New Zealand
Posted: 8th Aug 2009 04:34
The program will compile in stepthrough mode and will compile but will not run in debug.
will not build exe.
Plus now it will not load the bsp.
PRoF said that he doe's not recomend bsp because they are slow to load, but untill i can find out the way to load anything else i have no choice.
Maybe you all can give me some pointers in the right direction.
Many Thanks

JWC
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 8th Aug 2009 04:41 Edited at: 8th Aug 2009 04:46
For levels I would either suggest looking into the advanced terrain feature of DBPro or using a modeller like 3D World Studio to model the levels.

You'd also probably need sparky's collision dll for the coliding stuff (much faster than native DBPro collisions)

I've heard tell of people using FPSC to create levels for DBPro projects, but I've never tried and dunno how hard it would be to pull off.

[Edit]

I also had to make the some changes to your code to make it run... I had some problems with a couple of the sound files being corrupt so I remmed them out. You were trying to load the music (as an MP3 file) with the sound commands, which only load wavs.

Thats all I can think of off the top of my head.

Here is my modified code. I had to change all the path names coz it was easier than putting all the media in the proper folders. Maybe next time try zipping it all up before you email?



This code will compile (once you sort the paths of the media out again); but it doesn't work as I think u intend it to do.

But just so you can see how well you've done

Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
Roland Conrad Szigeti
15
Years of Service
User Offline
Joined: 12th Apr 2009
Location: Melbourne
Posted: 8th Aug 2009 08:47
I need to buy Pro before I can help you.
joejoemoe
14
Years of Service
User Offline
Joined: 2nd Jul 2009
Location: New Zealand
Posted: 8th Aug 2009 13:45
@PRoF
Ihave come to the conclution that may be my dbpro program maybe corrupt,because i put a fresh install of dbpro on to a brand new hdd and i have the exact same problem except for now it will not load the bsp, and thats using your modified version.
Compiles ok but will not run or build the exe.
Many Thanks.
Quote: "Sorry if this offends you but... that's insane. "

OK Grog you conviced me.
Many Thanks

JWC
Grog Grueslayer
Valued Member
18
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 8th Aug 2009 18:46
Np. Do you have the latest Pro update 7.4?

http://darkbasicpro.thegamecreators.com/?f=upgrade_7_4

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Aug 2009 23:31
Quote: "Compiles ok but will not run or build the exe."


The new editor has some weird bugs which sometimes mean the executable isn't where it should be. On my machines the editor gives the executable an absolute file path and I have to edit it every time I transfer a project from one machine to another. You could try changing the name of the executable in the editor's Properties window - e.g. replace the whole path (if that's the problem) by something like temp.exe and try again. If that doesn't work take a screenshot showing the editor and error messages and post it in case it helps us help you.
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 9th Aug 2009 03:00
or maybe use an alternate editor. I use codesurge myself; its free and has never let me down

Without Music or Love the world would be a very empty place... Thank god I still have music.. --'-<@
joejoemoe
14
Years of Service
User Offline
Joined: 2nd Jul 2009
Location: New Zealand
Posted: 9th Aug 2009 07:18
Quote: " Do you have the latest Pro update 7.4?"

Yes i have i pulled it down last week

Quote: "The new editor has some weird bugs "

I sure will give it a go then post result.

@PRoF
Iam using codesurge and synergy with the same results in both editors.

JWC
joejoemoe
14
Years of Service
User Offline
Joined: 2nd Jul 2009
Location: New Zealand
Posted: 9th Aug 2009 09:41
@ Green Gandalf
You little corker,i changed the full path and low and behold a exe
appeared except that the exe is only half full as non of the editors will load the bsp but i will have a play with other maps and see if i can't get it to load that way.
The only problem that i know i will have is that i have not used either cloggys or sparkys dll before, that will be new to me.

JWC
joejoemoe
14
Years of Service
User Offline
Joined: 2nd Jul 2009
Location: New Zealand
Posted: 10th Aug 2009 09:18
@ Everyone

Who can tell me where to go to get cloggys or sparkys dll.

JWC
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 10th Aug 2009 12:15
The mods tend to frown on us for putting posts on the forums that consist of the phrase
'Use the search engine'

but I'm gonna risk it this time.

Use the search engine!

The locations of both of these plugins are really easy to find!

"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library

First you Dream, then you ... - Neil Gaiman, 2001
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th Aug 2009 20:45
Quote: "Use the search engine!

The locations of both of these plugins are really easy to find!"


Only if you know what to search for. I've just searched for both and could only find Sparky's dll.

A link to cloggy's dll might be buried in another thread somewhere - but who's going to read 50 different threads just to find a link?

If a Mod were to frown on you I'd support them.
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 11th Aug 2009 00:05
*humbled*

Sorry GG!

Cloggy's DLL is available from his homepage:
http://www.dbdepot.co.uk/index.html

"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library

First you Dream, then you ... - Neil Gaiman, 2001
joejoemoe
14
Years of Service
User Offline
Joined: 2nd Jul 2009
Location: New Zealand
Posted: 11th Aug 2009 00:35
@Dream and Deeath
Many Thanks i had tried the search engines before i posted @ had no luck.
@Green Gandalf
do you the url for sparkys so i can give them both a try,thats if there is any differance in the two.

JWC
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th Aug 2009 01:31
Sparky's plugin

It took me a while to find that again.
joejoemoe
14
Years of Service
User Offline
Joined: 2nd Jul 2009
Location: New Zealand
Posted: 11th Aug 2009 05:05
@ Green Gandalf
Many Thanks for that maybe now i can sort this out.

JWC

Login to post a reply

Server time is: 2024-05-05 10:06:05
Your offset time is: 2024-05-05 10:06:05