Archived

This topic is now archived and is closed to further replies.

Guest Sirocco

C# and out of context

Recommended Posts

I'm a newcomer to SimConnect and C#. I'm more familiar with C/C++ but I like the simpler environment of C#. I'm working on a basic project to familiarise myself with both, but I keep running into the problem.The code below is part of the project. The first two lines execute fine, but the third comes up with this error:Error 1 The name 'simconnect_OnRecvException' does not exist in the current contextI can't grasp why the first two work, but the third doesn't. I've installed the SDK SP1a patch, but not SP2. Would that fix it? I'd rather not go to SP2 if I can avoid it.[faux code]simconnect.OnRecvOpen += new SimConnect.RecvOpenEventHandler(simconnect_OnRecvOpen);simconnect.OnRecvQuit += new SimConnect.RecvQuitEventHandler(simconnect_OnRecvQuit);simconnect.OnRecvException += new SimConnect.RecvExceptionEventHandler(simconnect_OnRecvException);[/faux code]

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Do you have a function called simconnect_OnRecvException? The editor will generally create those for you while typing in the lines using Intellisense, but if you didn't hit Tab or Enter (which ever is required), it might not have created the last one automatically.

Share this post


Link to post
Share on other sites

>Do you have a function called simconnect_OnRecvException? That was it, thanks. I went through so many pages looking for an explanation for a "context" error without finding a common thread. I'll have to find a list breaking these errors down into plain English.

Share this post


Link to post
Share on other sites