C++ Question "Identifier not found" error concerning particle streams

Columbia42

Member
Joined
Dec 4, 2009
Messages
884
Reaction score
0
Points
16
Location
C:\ProgramFiles\Orbiter
When I add the lines "AddExhaustStream etc." an error comes up that says "indentifier not found." I have the particle stream specs entered right above the Add Exhaust Stream line but I still get this error. (The code is fairly old. I think it was intended for Orbiter v030303.) The addon whose code it is is McDope's N1.
 
Can you post the appropriate snippet of code? Because you haven't given even the full error. Hard to tell what is wrong with certainty based on the given information.
 
Which identifier? What is the specific line causing the error?
 
Here is the code line that is causing the error:

AddExhaustStream (th_first, _V(0,0,-51), &contrail_first);

Here is the exact error:

'AddExhaustStream': identifier not found

That's all the build log said.
 
OK, you will need to post even more information. I would post the entire file in code tags if possible. From this, it could be a number of things. For example, you may have not included the appropriate headers. Or you are calling the AddExhaustStream method from a function that is not a member function of a VESSEL child class.
 
Last edited:
Try changing it to vessel->AddExhaustStream.
 
Well, that allowed the code to compile. However your problem is not the error, it appears to be an underlying misunderstanding of how C++ works.

There are many excellent tutorials out there on the internet, and I would strongly suggest you look one up and get to grips with the fundamentals of programming, lest we wind up with another thread like this next time you get an error.

For instance, changing it to vessel->AddExhaustStream worked, but why did it work? If you can't answer that, you need to study until you're able to. I don't want to sound harsh, and my point is not "You made a fail, hahaha", my point is that coding is a logical process, it is perfectly possible to get your head round it, and you will need to have a grip of the basics before you will be able to properly code addons for Orbiter.

That said, I wish you every luck with it. You're at least one of only a few who actually try.
 
Last edited:
Back
Top