Does anyone know what the value is of an element that doesn't exist or how I can check if it exists or not? I've tried numerous conditional statements, the following being what I thought would be most likely to work:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
DWORD mouseEvents[] = {
MOUSEEVENTF_LEFTDOWN,
MOUSEEVENTF_LEFTUP,
};
int mouseReq = gLua->GetInteger(1);
DWORD mouseAct = mouseEvents[mouseReq];
if (mouseAct != NULL)
{
mouse_event(mouseEvents[mouseReq], NULL, NULL, NULL, NULL);
}
else
{
gLua->Error("Invalid index number specified.");
};