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 / Failed to 'DoInstruction::FindCorrectInstruction' Error, Unknown cause

Author
Message
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 10th Jun 2011 22:54
I compiled my code and suddenly got this error which has never happened before. Could someone please tell me what the error means?


Here's the part of my code where the line talks about.


Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 11th Jun 2011 10:17
yes that's odd.

Have you tired splitting the IF/THEN into an IF/ENDIF - Might be getting confused.



Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 11th Jun 2011 22:06
Ok tried that and it's still giving me that error. The program was running fine with that code earlier.

Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 13th Jun 2011 04:34
What's even weirder is that if I "rem" out those lines it still gives that error. Has anyone had a similar experience like this?

Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 13th Jun 2011 15:32 Edited at: 13th Jun 2011 15:33
Sounds more like a cascading error then, so the error isn't in this fragment of code but in the lines above it.

Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 14th Jun 2011 04:35
So would the error be caused by like a if statement and the endif is left out? Or is it something else?

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Jun 2011 11:49
I've just had a look at the code in your original post.

The error message refers to the fragment:



but I can't find that fragment in your second snippet:



Could you post the lines which contain the fragment?

Also, don't forget that line numbers are not always correctly reported in error messages - and as Kevin Picone says the compiler might only detect the error a few lines beyond the original error.

So a bit more code would be helpful.
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 15th Jun 2011 00:39
WOOPS!!! Sorry about that.
Oh wow, I just found that part of code and I had an extra ";" on the end of the line before it. When I looked up the code previously, I must have saw the two "40"s and thought that was the code. Once again thanks GG for pointing that out to me.

Login to post a reply

Server time is: 2026-07-10 22:55:03
Your offset time is: 2026-07-10 22:55:03