ledi12 2 Posted July 9, 2020 Share Posted July 9, 2020 Version of Files : XXX Hi, I'm trying to call some api functions from player module, like character position. PyObject* obj = PyImport_ImportModule(const char *"player"); std::cout << obj.GetMainCharacterPosition() << std::endl; I would appreciate any hint to to call python api in C. 1 Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10273 Posted July 9, 2020 Forum Moderator Share Posted July 9, 2020 (edited) Is not that easy as you think and also you need to make individual code for each function, if they've arguments and more. Here's my method, i tested it and works fine. This is the hidden content, please Sign In or Sign Up Edited August 22, 2020 by VegaS™ 9 12 9 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
ledi12 2 Posted July 9, 2020 Author Share Posted July 9, 2020 (edited) On 7/9/2020 at 9:02 PM, VegaS™ said: Is not that easy as you think and also you need to make individual code for each function, if they've arguments and more. Here's my method, i tested it and works fine. Looks fine to me To make it working I need to inject it as the dll first hmm ? Edited August 22, 2020 by VegaS™ Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now