On Nov 21, 6:16*am, Michael Sgier <sg...@nospam.comwrote:
Hi
Declaration:
XPLM_API XPLMDataRef * * * * *XPLMFindDataRef(
* * * * * * * * * * * * * * * * * * const char * * * * * inDataRefName);
Does this return a pointer?
So I try this:
XPLMDataRef * * * * * * gPlaneV = NULL;
gPlaneV = XPLMFindDataRef("sim/graphics/view/view_type");
if (XPLMGetDatai(gPlaneV) != 1026)
* * * * XPLMSetDatai(gPlaneV, 1026);
But this doesn't work. If the declaration returns a pointer so how can I
set it's value ( integer ) to 1026?
What do you mean by "it doesn't work" ?
Does the code fail to compile? If so, what is the error message?
If it does compile, does it crash? If so, what error message?
If it runs, how do you know it doesn't work?
Read the documentation, which includes:
"Write a new value to an integer data ref. This routine is a no-op if
the plugin publishing the dataref is disabled, the dataref is invalid,
or the dataref is not writable."
--
Fred Kleinschmidt