PDA

View Full Version : Strange error?



ta0soft
03-08-2011, 01:48 PM
I'm trying to compile a plugin for lw10, all is good except for one strange error...

Most of the panel macros work, I can create a panel, get the version, set the size, and show the panel. But I get a strange error when I try to use the _CTL macros to add controls to the panel.

error C2065: 'desc' : undeclared identifier



static int CreateUI(void)
{
LWPanelID panel;
LWControl *ctl[MAX_CONTROLS] = { NULL };
int tmpInt;

if (!(panel = PAN_CREATE(g_PanelFuncs, "SMD Mesh Exporter"))) return 1;

tmpInt = PAN_GETVERSION(g_PanelFuncs, panel);
if (tmpInt != LWPANELS_API_VERSION)
{
PAN_KILL(g_PanelFuncs, panel);
return AFUNC_BADVERSION;
}

PAN_SETW(g_PanelFuncs, panel, 520);
PAN_SETH(g_PanelFuncs, panel, 440);

ctl[OBJECT_INFO_TEXT] = TEXT_CTL(g_PanelFuncs, panel, objNameInfo, dummy);
MOVE_CON(ctl[OBJECT_INFO_TEXT], 5, 10);

ctl[SCALE_CHOICE] = BOOL_CTL(g_PanelFuncs, panel, "Scale geometry:");
MOVE_CON(ctl[SCALE_CHOICE], 8, 320);

PAN_POST(g_PanelFuncs, panel);

PAN_KILL(g_PanelFuncs, panel);

return 0;
}


Has anyone else experienced this issue?

ta0soft
03-08-2011, 01:51 PM
Oops I meant to post this in the plugin section. Can someone move it there please -_-

dpont
03-08-2011, 02:35 PM
I suppose that "g_PanelFuncs" is your correct
panel function for control,
but "panf" in BOOL_CTL?

Denis.

ta0soft
03-08-2011, 02:52 PM
I suppose that "g_PanelFuncs" is your correct
panel function for control,
but "panf" in BOOL_CTL?

Denis.

Oops, typo. It should be g_PanelFuncs in both

dpont
03-09-2011, 04:01 AM
I don't see a 'desc' variable in your sample code,
in plugin templates it is often used in
the Describe() function, did you declare it?

Denis.