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 / Error #100013 Command out of place at line

Author
Message
MageMaster
23
Years of Service
User Offline
Joined: 19th Jul 2003
Location:
Posted: 20th Jul 2003 04:22
I have a do loop when I try to run the program it gives me this Error #100013 Command out of place at line #'. At the line it say's is the Loop Command. If there is anything else that can cause this error please let me no. Any help would be greatly appreciated. I have posted the code in the source section in this post.

Sincerely,
Mage Master
keeblerElf
23
Years of Service
User Offline
Joined: 11th Jun 2003
Location: United States
Posted: 20th Jul 2003 04:40
You should place the whole code because what is probably wrong is that you have endif command or something like that missing. you should go through your code and make sure you aren't missing and next or endif commands

andrew11
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 20th Jul 2003 04:47 Edited at: 20th Jul 2003 04:49
It's because you NEED to have either a THEN or ENDIF after an if.

This should help you out


"All programmers are playwrites and all computers are lousy actors" -Anon
the_winch
23
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 20th Jul 2003 04:48 Edited at: 20th Jul 2003 04:49
It's the if with out then statement
this would work but you need to replace the statments after then with your own depending on what you want to do.
if upkey()=1 then inc y
if downkey()=1 then dec y
if leftkey()=1 then inc x
if Rightkey()=1 then dec y

From the dbpro help
IF
This command will allow your program to perform a sequences of commands based on the result of a condition. If the condition is true, the commands after the THEN keyword are performed. Ensure that your
commands after the THEN keyword are separated by a colo. If the condition is false, the rest of the line is skipped.

Beaten by a minute

Login to post a reply

Server time is: 2026-07-21 05:56:21
Your offset time is: 2026-07-21 05:56:21