Failed to connect krpc 0.5.1 to KSP 1.12.4
CharlesZiy opened this issue ยท 3 comments
I'm using krpc with C++, however, after I run my program, it can't connect with the game and just quit. I can't connect to the localhost server with any code, even the tutorial code can't work.
P.S.1, I changed my RPC port and Stream port and also change it in my krpc::connect, but it failed.
P.S.2, I can successfully connect to localhost with python client, so the problem only happens when using C++.
What version of the C++ library are you using?
I am planning to do a new release in a few hours. It includes a few fixes for the C++ client
Can you try with v0.5.2 that I just released? I tried this simple script and it worked fine:
#include <iostream>
#include <krpc.hpp>
#include <krpc/services/krpc.hpp>
int main() {
auto conn = krpc::connect();
krpc::services::KRPC krpc(&conn);
std::cout << krpc.get_status().version() << std::endl;
}
If that still doesn't work, could you turn "Debug Logging" on (it's under "Show advanced settings" in the server window). then run your program to try and connect, and send me a copy of your game logs. These logs might show what's wrong.
Well, I think it's my client problem since I'm using another people's compiled pack.
I'm going to change to python to finish my project :)
By the way, I think the configure procedure is too complicated for MinGW + Windows users, so I'll glad to see a official compiled client pack :)
You can close this issue, thank you very much!