After looking at the code...(Open-Orbiter that is) I think readstatus & writestatus
are implemented!
C++:
const int NCLBK = 13;
const int SETUP = 0;
const int BUTTONLABEL = 1;
const int BUTTONMENU = 2;
const int CONSUMEBUTTON = 3;
const int CONSUMEKEYBUFFERED = 4;
const int CONSUMEKEYIMMEDIATE = 5;
const int UPDATE = 6;
const int STORESTATUS = 7;
const int RECALLSTATUS = 8;
const int WRITESTATUS = 9;
const int READSTATUS = 10;
const int PRESTEP = 11;
const int POSTSTEP = 12;
const char *CLBKNAME[NCLBK] = {
"setup", "buttonlabel", "buttonmenu", "consumebutton", "consumekeybuffered", "consumekeyimmediate",
"update", "storestatus", "recallstatus", "writestatus", "readstatus", "prestep", "poststep"
};
Maybe the signature of your callback unctions is just not correct?
readstatus & writestatus expect a function with one parameter (the
FILEHANDLE; I don't know what that translates to in Lua)
C++:
// Read MFD status from file
void ScriptMFD::ReadStatus (FILEHANDLE scn)
{
if (bclbk[READSTATUS]) {
lua_getfield (L, LUA_GLOBALSINDEX, CLBKNAME[READSTATUS]);
lua_pushlightuserdata (L, scn);
lua_call (L, 1, 0);
}
}
Can you provide a minimal Lua script for me to try?
Please make it as simple as possible so no one gets distracted. Best would be just a demo with prestep, poststep, readstatus & writestatus
that does not depend on any other add-ons (if possible)