C++ Runtime Error

11/06/2023 22:33 raceshow#1
I coding Python apı on c++ like :

std::string getPlayerName()
{
std::string result;
if (!PyCallClassMemberFunc(py_module, "GetMainCharacterName", Py_BuildValue("()"), result)) {
return "";
}
return result;
}

But when call python functions i get C++ Runtime Error and client crashes.All c++ runtime libraries installed.Can one help me ?
11/06/2023 22:52 Drewfire#2
First of all you should implement some error handling to fetch the error. This might help you find out whats causing the crash :)
11/06/2023 23:05 raceshow#3
Quote:
Originally Posted by Drewfire View Post
First of all you should implement some error handling to fetch the error. This might help you find out whats causing the crash :)
How can i do this ? try catch can't catch error