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.

Bug Reports / compiler states syntax error on line higher than project length

Author
Message
Ched80
13
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 8th Dec 2010 08:30
hi,
I'm running DBP compiler version 1.071 on XP and I'm trying to write a simple 2D game. When I try and run the game, the compiler fails stating: "Command out of place at line 697" but my project is only 675 lines long.
Any ideas what is causing this? No line is high-lighted when the compiler fails.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Dec 2010 14:12
Ched80
13
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 8th Dec 2010 19:43
1. I use the latest DB Pro (I use 7.5). When I check for updates it confirms my software is up-to-date.

2. See attached (you'll have to comment out the *.bmp files or just use some random ones).

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]

Attachments

Login to view attachments
Ched80
13
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 8th Dec 2010 19:45
For 2 i've put all the files in a zip folder.

I hope you can help.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]

Attachments

Login to view attachments
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Dec 2010 22:47
Ok, but you did say:
Quote: "I'm running DBP compiler version 1.071"


Now there is a bug with line numbering, which can be corrected by removing the comments between your SELECT and CASE statements, the ENDCASE and following CASE statements, and between the last ENDCASE and ENDSELECT statements.

Once you do that, you'll get the right line number. Then you'll see that you have a DO with a matching UNTIL statement at the very end of your function - replace the DO with a REPEAT.

Ched80
13
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 9th Dec 2010 10:25
Thanks for this,

Incidently DBP 7.5 states the compiler version is 1.071 when you select Help - About DarkBASIC Professional Compiler...

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Dec 2010 12:25 Edited at: 9th Dec 2010 12:29
Quote: "Incidently DBP 7.5 states the compiler version is 1.071 when you select Help - About DarkBASIC Professional Compiler..."


No it doesn't. Suggests you haven't got U7.5 after all.

Also there isn't an About DarkBASIC Professional Compiler option on mine. I assume you meant just About DarkBASIC Professional

Edit Also, you should have Build Jun 23 2010 for the editor from the Help menu. What do you have?
Ched80
13
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 10th Dec 2010 12:21
apologies, it seems I had installed 7.1 and not 7.5.

I've upgraded to 7.5 now and I get the correct build date and updated editor. Sorry for the confusion and thanks for the help.

Ched

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]

Login to post a reply

Server time is: 2024-03-29 09:19:15
Your offset time is: 2024-03-29 09:19:15