I am trying to write a C++ API function that would return a string in an ExtState.
Everything builds OK, but when I call the function from a Lua script, the script and IDE hangs indefinitely.
For example, if I call this function from a script using MyFunction("testing"), the console message pops up (demonstrating that the string is passed to the API function) and then the script hangs:
Code:
void MyFunction(const char* myString)
{
ShowConsoleMsg(myString);
SetExtState(myString, myString, myString, 1);
}
If I do it the other way around, execution doesn't even reach the ShowConsoleMsg:
Code:
void MyFunction(const char* myString)
{
SetExtState(myString, myString, myString, 1);
ShowConsoleMsg(myString);
}
If I close the IDE and try to run the script from the action list, I get the popup message that the script is already running, asking whether I would like to terminate the script or open a new instance.