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 / DBPro comile error

Author
Message
Jaded Gamer
18
Years of Service
User Offline
Joined: 19th Apr 2006
Location: Iceland
Posted: 15th Jun 2006 21:37 Edited at: 15th Jun 2006 22:54
failed to 'DoExpressionList:: DoExpressionListString'

Can someone please help with this error? This error occurs when I attempt to compile the program, but doesn't indicate where the problem is.

I tried to search for this, there were a couple things that came up but one is a post that has been deleted, and the other refers to a DBPro bug from an earlier version concerning using a constant in a string... However I have no constants declared in the entire program.
There are numerable strings however, as this is in my text adventure I am working on for the competition.

Does anyone know what might cause this kind of error? I have over 1100 lines I have been searching through to try to figure this out.

Another thing... is there somewhere online where there is some sort of list or information to assist with error messages and how to fix them? There is nothing like that in the DBPro help files that I have been able to locate.

"So it goes."
Mickm
18
Years of Service
User Offline
Joined: 22nd Apr 2006
Location: Kingston, ON
Posted: 16th Jun 2006 23:32
What version are you using?

I did a quick search and found this

http://forum.thegamecreators.com/?m=forum_view&t=52254&b=15

http://www.gamestack.org
Jaded Gamer
18
Years of Service
User Offline
Joined: 19th Apr 2006
Location: Iceland
Posted: 17th Jun 2006 00:50
Ah yes, thats the one I had seen as well. My version is 6.1 btw.

The error they are talking about in that message is one that involves using a constant in a string. But I don't have any constants declared, string or otherwise.

Thanks for trying at least =)

I am really frustrated. This is my first program, I had just gotten DBPro a couple of days before I started on this. I would put up a snippet of code if I had any clue what part was causing the problem (except if I knew, then I could fix it).

"So it goes."
Jaded Gamer
18
Years of Service
User Offline
Joined: 19th Apr 2006
Location: Iceland
Posted: 21st Jun 2006 00:03
Anyone?

This is the information I found:

Quote: "DoExpressionList:: DoExpressionListString
defines a method (function for a class or object) called DoExpressionListString for a class/object type called DoExpressionList
"


the problem is within the code for the DBPro compiler itself? If so, what can I do?

"So it goes."
Jaded Gamer
18
Years of Service
User Offline
Joined: 19th Apr 2006
Location: Iceland
Posted: 29th Jun 2006 13:19
Can anyone please help? I have tried many things, and still have the same error problem:

failed to 'DoExpressionList:: DoExpressionListString'

There is no line number in the error, its a compile error. If there is something wrong in the code I have no clue what it is or where to find it.

I am including the full code if anyone is willing to help with this.

"So it goes."

Attachments

Login to view attachments
Mr X
19
Years of Service
User Offline
Joined: 25th Sep 2005
Location: Universe, milkyway, sol-system, Earth...
Posted: 29th Jun 2006 13:47 Edited at: 29th Jun 2006 13:54
Sometimes the compiler says to me that its unable to include CFile something, but I know that it has nothing to do with my code, its the compiler. Porhaps youve got the same problem, something in the compilers is not functioning. You can try to reinstall dark basic, and save the source as a separate text document. Then you can use it again after youve reinstalled dark basic.

Hope it helps.

EDIT:

Ok, I tested your source, but got the same thing you did. Then I tested one of my own programs, but it worked. Sorry, it must be the source. What did you add when the problem uccured? You could go back and delete those parts, and see if it works.

P.S. The source look much better then my first one. I wish you goodluck.
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 29th Jun 2006 14:33
My advice, use functions instead of gosubs!

Seriously, save your code as a text file, and then delete each subroutine seperatley, one at a time, so you just have label: followed by return.

You'll soon find the part of the code causing the compiler crash. Then you can examine the code carefully to find the prob.

Good luck!
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 29th Jun 2006 19:20
If you look in TEMP folder where darkbasic is installed you will find a very handy crash file called errorreport.txt and it tells you what bit of code causes that strange crash.

In your case the line;

set cursor ((790-x),10)

which should produce a proper error as it should be, I assume;

set cursor 790-x,10

Boo!
Jaded Gamer
18
Years of Service
User Offline
Joined: 19th Apr 2006
Location: Iceland
Posted: 29th Jun 2006 21:56
Quote: "P.S. The source look much better then my first one. I wish you goodluck."


Thank you, I think I need the luck =)

Quote: "My advice, use functions instead of gosubs!"


ok, I will try changing the gosubs to functions.

Quote: "If you look in TEMP folder where darkbasic is installed you will find a very handy crash file called errorreport.txt and it tells you what bit of code causes that strange crash."


wow! Thank you, that is so good to know! I had been unable to really do anything with this for the last two weeks, and now I can finally try to get this done.

Thank you all very much!

"So it goes."
Jaded Gamer
18
Years of Service
User Offline
Joined: 19th Apr 2006
Location: Iceland
Posted: 29th Jun 2006 22:17
Another question

I have heard people say many times throughout the forum, that its bad coding to use goto. Why is that?

on a related note with something that puzzles me, what is the proper use of exit when in the middle of nested (is that the right term?) commands? for example:



what would be the correct way to exit the entire function here?

"So it goes."
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 29th Jun 2006 22:51
I'm not going to re-open the goto debate - my advice, wikipedia it and have a read!

As to the 'proper' method of exiting nested loop (there are loads of ways this is just one )
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 30th Jun 2006 00:34
It's a shame that the exit command does not have the option of specifying how many loops you want to exit. Some other languages do and it can be very useful if you want to suddenly exit but you are 3 nested loops in.

Boo!
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 30th Jun 2006 01:09
You can still do it with one flag. Just set the flag to the binary number representing how many loops you want to exit. I don't think I've explained that right, so I'll illustrate:

flag=1, just exit up one loop
flag=2, exit two loops up
flag=4, exit three loops
flag=8, exit four loops

Then just check the flag after each possible exit, and decrement it.

I suppose, thinking about it,that you could just count the number of levels to quit rather than playing around with base2 - I know there was a reason that I did it at the time, but I've forgotten now!
Jaded Gamer
18
Years of Service
User Offline
Joined: 19th Apr 2006
Location: Iceland
Posted: 30th Jun 2006 03:28
D and D, would using exitflag=4 exit the entire function?

"So it goes."
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 30th Jun 2006 03:39 Edited at: 30th Jun 2006 03:48
Depends how many levels of nested loop you have!
Silly code coming up!

Jaded Gamer
18
Years of Service
User Offline
Joined: 19th Apr 2006
Location: Iceland
Posted: 30th Jun 2006 03:52
heh, I had to look at that for a while but it is sinking in

Thank you much for explaining, that will come in very handy!

"So it goes."
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 30th Jun 2006 04:01
Yeah, nested loops are not pretty, which is why good indentation habits are a must!

I wish we had an elseif command though!

Login to post a reply

Server time is: 2024-11-26 17:15:34
Your offset time is: 2024-11-26 17:15:34