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 / Could not understand command at line 1

Author
Message
dunce11
20
Years of Service
User Offline
Joined: 14th Dec 2003
Location:
Posted: 14th Dec 2003 09:05
I have just installed the trial version and loaded the Pelican project. On running it in step through mode I get the error message
"Could not understand command at line 1"

Have I missed something in the installation of the trial version.
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 14th Dec 2003 11:26
Pelican project? Could you post the code here please.


"Computers are useless they can only give you answers."
dunce11
20
Years of Service
User Offline
Joined: 14th Dec 2003
Location:
Posted: 14th Dec 2003 12:00
The Pelican project is the demo project that cokmes with the trial version. The first line is a REM comment statement.

But it seems to displace this message regardless of the command in the source. I created a new source and just wrote TEXT 100,100,"HELLO" and it was still showing the same error message.
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 14th Dec 2003 15:15
Code plz..also are you using DB or DBP?


Dont forget to Join the Forums!
dunce11
20
Years of Service
User Offline
Joined: 14th Dec 2003
Location:
Posted: 14th Dec 2003 23:52
I've already said above that I have downloaded the trial version from this website.

But here is the code anyhow. But the message "Could not understand command at line 1" is displayed with any code.
dunce11
20
Years of Service
User Offline
Joined: 14th Dec 2003
Location:
Posted: 14th Dec 2003 23:53
...
dunce11
20
Years of Service
User Offline
Joined: 14th Dec 2003
Location:
Posted: 14th Dec 2003 23:54
I think the trial version is DBPro
dunce11
20
Years of Service
User Offline
Joined: 14th Dec 2003
Location:
Posted: 14th Dec 2003 23:56
The error number is #100011
dunce11
20
Years of Service
User Offline
Joined: 14th Dec 2003
Location:
Posted: 14th Dec 2003 23:59
My machine spec is:

Athlon 2GHz processor with 258Mb RAM
GEFORCE FX5600 graphics card
Windows 98SE
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 15th Dec 2003 18:05
Make sure you have directx 9.0b
To check your directx version run dxdiag(start > run enter dxdiag and press ok)

Try updating your graphics card drivers as well.

dbpro : p166mmx @ 233 : 256mb : sb 128pci : sis onboard
Guyon
21
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 15th Dec 2003 18:21
Try taking out the colons on all lines that have a REM
dunce11
20
Years of Service
User Offline
Joined: 14th Dec 2003
Location:
Posted: 15th Dec 2003 22:10
So are you saying the DBPro trial version is reliant upon having DirectX 9b installed an will not work with earlier v8. I find that a bit surprising. Graphics drivers are up to date.
Jaze
20
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 15th Dec 2003 23:46
Shouldn't anything in a REM statement be IRRELEVANT? (I've run into issues with this that forced me to totally revamp my code by deleting REM'd out statements - with them gone - it worked - but that was a heck of a lesson in code structure.... "REMARKS are Buggy" so No REMARKS = HArd to Read... UGH


-=/Jaze/=-
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 16th Dec 2003 11:29
Quote: "So are you saying the DBPro trial version is reliant upon having DirectX 9b installed an will not work with earlier v8. I find that a bit surprising. "


That is correct. The DBP compiler converts what you write into DirectX 9 compliant-code. Basically it compiles everything you type into machine code based off the DirectX 9 API. For this to work correctly you need to have DirectX 9b installed.

Quote: "Shouldn't anything in a REM statement be IRRELEVANT? (I've run into issues with this that forced me to totally revamp my code by deleting REM'd out statements - with them gone - it worked - but that was a heck of a lesson in code structure.... "REMARKS are Buggy" so No REMARKS = HArd to Read... UGH"


Jaze, what problems did you have with Remarks? I don't use the "Rem" command but instead use the "`" symbol and have never run into any problems ever. You might want to try that instead.


"Computers are useless they can only give you answers."
Jaze
20
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 16th Dec 2003 11:33 Edited at: 16th Dec 2003 11:40
@Exeat.... Well.. I had a bunch of blocked out code in one example - using remstart and remend.... and the line number error stuff was all wrong... in one instance... trying to find an error - I only deleted the REMSTARt REMEND blocks cuz I thought the error numbers were just wrong - due to whitespace or something - I blasted away the comments and then the code worked. WHOA! Another situation I couldn't have a REMARK using the left quote (left of one key) in a type statement:
type mytype ` used for doing this and that
x as integer
y as integer
endtype

I've had one problem after another trying to use separate source code files (for organization) ... basically - I've run into so many strange variable scope issues and stuff (Like declaring an array which is supposed to become global.... just to tell me the array doesn't exist in a function right below) the wrong line #'s from error messages with multiple files, and all that junk.... Now I write everything in one sloppy source file because I have a chance at finding bugs because at LEAST the IDE gets me reletively close to the error.... I still use comments - though only on a line by themselves (thats the usual rule I go by) No more remstart remend blocks - messes up line numbers more than anything I think.... but most importantly... I can ALMOST get modular by making code like this:


` MODULE OBJECT STUFF
global x
global y
goto skipoverobjectfunctions
function objectdothis()
endfunction
function objectdothat()
endfunction
skipoverobjectfunctions:

` Next Module Code
same thing.... then after all these types of things... I make a typical main loop thingy at bottom.

Crisp and clean? Ya right... Tons of Caffeine? YES INDEED. UGH.


-=/Jaze/=-
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 16th Dec 2003 14:42 Edited at: 16th Dec 2003 14:45
Sorry I can't say anything about Remstart and Remend because I've never used them but I think I might just to see if I run into any problems.

Quote: "Another situation I couldn't have a REMARK using the left quote (left of one key)"


The 'Tilde'

Okay, answered your first problem in the other thread. Use something like:

type mytype : ` used for doing this and that
x as integer
y as integer
endtype


Ok, now this should help with structuring your code. I can see where you've gone messy just by that small explanation. It's good that you keep globals at the top, they're easy to access, add new ones, check what type etc. The problem lies in that you have your functions in the Main source code at the top. Of course the compiler cannot run into a function because it'll just go beserk, this is with all languages. Here's how I setup my code:

`Pre-game commands
Sync On
Sync Rate 0
etc

`What each var does
Global VarName

`Default Values for vars
VarName = 20

`Main Loop

Do

DoStuff()


Sync

Loop

`Functions
Function DoStuff()

`Move Guy or whatever

End Function

Then in any other source file I'll have more functions. I don't have any procedural commands in an external source file because the program should never naturally run into them. I only keep functions in external sources, not even global variables. I also make a habit to use Hungarian notation, ie. Name my variables: strCharName or intYCharPos - Makes it easier to remember what type it is so you don't run into as many 'stupid' errors like assigning an integer to a string which I used to do a lot.


"Computers are useless they can only give you answers."
dunce11
20
Years of Service
User Offline
Joined: 14th Dec 2003
Location:
Posted: 16th Dec 2003 23:13
I have now installed DirectX v9.0b . Executing the Pelican project does now display the pelican in all its shinning glory.

However when I try and step through the program I am still getting the message "Could not understand command at line 1" on the first line.

This has nothing to do with it being a REM statement. The error occurs regardless of the code typed into the source.
dunce11
20
Years of Service
User Offline
Joined: 14th Dec 2003
Location:
Posted: 16th Dec 2003 23:23
I'm trying to use copy & past in the source code but all it does is past part of the help file into the source code.
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 16th Dec 2003 23:45
Hmm, no idea why step-through doesn't work when it compiles fine. You might want to try reinstalling the program now that you have DirectX installed. Also, where are you copying from and where are you pasting to?


"Computers are useless they can only give you answers."
dunce11
20
Years of Service
User Offline
Joined: 14th Dec 2003
Location:
Posted: 16th Dec 2003 23:52
Hi

I have tried copying from the source code onto another line, copying to another source code file and into notepad. In each case it grabs the help file text and pastes that.

I have found the tutorials now thank goodness and frustration is turning into fun.
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 17th Dec 2003 02:28
That's strange, copying should work fine. Something must have gone wrong with your installation, did you try installing again?


"Computers are useless they can only give you answers."
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 17th Dec 2003 19:26
are you using step through mode(f7) the whole time? theres a bug in dbp which mean this doesn't work, just compile it normally(f5) and it should run fine


GO TO THE ETERNAL DESTINY FORUMS!!! http://forums.eternaldestinyonline.com
Do it now!!!

Login to post a reply

Server time is: 2024-09-21 14:54:44
Your offset time is: 2024-09-21 14:54:44