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.

Author
Message
Dark Basic Pro Enthusiast
11
Years of Service
User Offline
Joined: 8th Nov 2013
Location:
Posted: 23rd Mar 2014 06:09
Okay, so I am very new to Dark Basic Pro, and do not know a couple things. One thing I do not know about is a "Parser error" which I am currently trying to figure out. Whenever I try and run my code, I get a annoying "Parsers Error" message and I don't know why. The attached file is the code I am working with that has the problem. I realize this code is quite messy and it is because 1. I am very new to this and 2. This is for school so I am not trying to make this like the best thing in the world. Thank you for your help!

Attachments

Login to view attachments
ShellfishGames
12
Years of Service
User Offline
Joined: 6th Feb 2013
Location:
Posted: 23rd Mar 2014 11:54
The attached file is your project file and not your code. You need to upload the .dba file (Certification 2_1.dba I assume).

Generally a parser error means that something about your code structure is wrong. Basically the parser is trying to "understand" the structure of your code before the compiler will then translate it into a binary file. I'm not sure when exactly DBP refers to Parser Errors as such, but I guess it could be something like a missing paranthesis, or you forgot to close a nest somewhere. What exactly does the error message say? Nothing more than "Parser Error"?

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Mar 2014 12:06
Quote: "Nothing more than "Parser Error"?"


That rings a horrible bell and I vaguely recall that happening with an old version of the editor. Haven't seen that one for years. I'd be very surprised if it has anything to do with the code.

Which version of DBPro and the editor are you using? Use the "About" items in the Help menu to find out.



Powered by Free Banners
tiffer
19
Years of Service
User Offline
Joined: 6th Apr 2006
Location: Scotland
Posted: 23rd Mar 2014 15:49 Edited at: 23rd Mar 2014 15:50
Parsing in lamens terms basically refers to how a computer understands our human language. So a parser error basically means in human terms... "Don't understand???" It usually occurs when you make a syntax error. Syntax derives from ancient greek but it refers to how language is structured.

So to summarize a parser error in Dark Basic usually means you haven't followed the correct Dark Basic language structure.

Hopefully the program will have given a line number and a program trace. You often find that the error you made actually occurs the line or a few lines before the line number given. It's best to look at the program trace in the error log. If else fails try following your footsteps back.
Quote: "
That rings a horrible bell and I vaguely recall that happening with an old version of the editor. Haven't seen that one for years. I'd be very surprised if it has anything to do with the code."


If I remember correctly you could get a parser error with no information if you included something and then deleted it without unincluding it.

Cwatson
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Mar 2014 16:00
Quote: "So to summarize a parser error in Dark Basic usually means you haven't followed the correct Dark Basic language structure."


Can you supply a simple snippet that gives that particular error message?

I agree there's lots of ways of producing parser errors - but in DBPro the actual error message usually says something else such as "could not understand ...".



Powered by Free Banners
tiffer
19
Years of Service
User Offline
Joined: 6th Apr 2006
Location: Scotland
Posted: 23rd Mar 2014 17:41 Edited at: 23rd Mar 2014 17:44
I believe it can sometimes give an undefined parser error in odd situations. Perhaps if you dim an array and then un dim it and then dim it again with a different data type. A sort of "it should make sense but it doesn't" situation.

It's always possible that errors can happen not thought of before and therefore don't have a name.

Cwatson
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Mar 2014 20:58
The "undefined parser error" was the old editor issue. I don't think I've seen it since the editor was fixed.



Powered by Free Banners
Kevin Picone
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 24th Mar 2014 04:40
still occurs in the DBPro demo.

tiffer
19
Years of Service
User Offline
Joined: 6th Apr 2006
Location: Scotland
Posted: 24th Mar 2014 12:34
I'm fairly sure it can happen if you make the 'right mistake'. Green Gandalf obviously knows DB's syntax rules well enough not to make the mistakes I've made as I've only just came back to DB.

Cwatson
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 24th Mar 2014 13:00
Quote: "still occurs in the DBPro demo."


I can believe that. That probably uses the old editor I was talking about earlier. Just upgrade DBPro.

Quote: "I'm fairly sure it can happen if you make the 'right mistake'"


I'd still like to see an example. And as I said before I don't think this particular error has anything to do with the code. It would help if the original poster came back and clarified a few things.



Powered by Free Banners
tiffer
19
Years of Service
User Offline
Joined: 6th Apr 2006
Location: Scotland
Posted: 24th Mar 2014 13:03
Quote: "It would help if the original poster came back and clarified a few things."


I tire of these kids posting stuff and then never replying to your responses.

Cwatson
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 24th Mar 2014 13:43
Me likewise.



Powered by Free Banners
Dark Basic Pro Enthusiast
11
Years of Service
User Offline
Joined: 8th Nov 2013
Location:
Posted: 24th Mar 2014 16:12 Edited at: 24th Mar 2014 16:13
Quote: "I tire of these kids posting stuff and then never replying to your responses"

sorry to keep you waiting. I had a busy weekend and had no internet access where I was, therefore I was unable to respond.

I just want to clarify that, yes, I am running the dbpro demo, as I am just doing this for school and it was the cheaper route. I most likely will not upgrade to the full version, because the school year is almost up, and I am not sure if I am going to continue with this program.

Also,
Quote: "The attached file is your project file and not your code. You need to upload the .dba file)."
I am sorry I didn't do it correctly, and Since I am at school right now, I cannot resend the file.(since I was working on my project at my house, I accidently forgot my flash drive ) When I get home today, I will resend the file along with the actual code.

Thank you all for responding and trying to help with this odd situation.
Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 24th Mar 2014 16:18
Thanks for that explanation. Ignore our earlier whines.



Powered by Free Banners
ShellfishGames
12
Years of Service
User Offline
Joined: 6th Feb 2013
Location:
Posted: 25th Mar 2014 00:40
Quote: "I am sorry I didn't do it correctly"


No need to be sorry about that, I just wanted to clarify the issue.

Actually, I'm really quite interested in that code, as I'd like to see that mysterious Parser Error in action now. (Unless it really is just a problem limited to the free version you're using, that would be kind of disappointing)

Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 25th Mar 2014 02:16
Quote: "I tire of these kids posting stuff and then never replying to your responses."

Ouch! It hasn't even been 24 hours yet, give the guy a break!

Quote: " I most likely will not upgrade to the full version"

There is an ad-supported free version. And then you can always download CodeSurge IDE.

Green Gandalf
VIP Member
20
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Mar 2014 12:16
Quote: "Ouch! It hasn't even been 24 hours yet, give the guy a break!"


Fair comment. I think we must have had other threads in mind.



Powered by Free Banners
tiffer
19
Years of Service
User Offline
Joined: 6th Apr 2006
Location: Scotland
Posted: 25th Mar 2014 14:29
I think my frustrations with another 'class member' may have been improperly placed. My apologies DBE.

Cwatson
Dark Basic Pro Enthusiast
11
Years of Service
User Offline
Joined: 8th Nov 2013
Location:
Posted: 26th Mar 2014 15:59
Okay, I did end up fixing the problem. It was with the dark basic pro demo, because when I ran my code on a different version, it worked. Thank you for all the help, guys!

Login to post a reply

Server time is: 2025-05-15 04:12:59
Your offset time is: 2025-05-15 04:12:59