Hi, I'm trying to develop a Pokemon Online bot. Right now it doesn't use illegal moves (it's really really stupid)... And I noticed that the battles randomly stopped. After introducing a delay of 10 ms before sending the chosen move, it works perfectly. So my question is: When is it OK to send the choice? I currently send the answer after I received StartChoices (43). StartClock is sent before this message. And three messages are sent after StartChoices: DynamicInfo(x2) and DynamicStats. The simplest option is to wait some time until we are sure the server is ready. But there's no guarantee that this works under a heavy load, and for a computer program this is a rather large delay. Option two is fixing this in the source code of the server. I don't know C++ very well yet(maybe in three months when my course is finished). And threading issues are no fun to debug. I wanted to make you aware of this peculiarity (it's not really a bug). And since you know C++ and the project better than me maybe there's a quick fix. P.S. I really really love the project. Thanks for making and supporting it.
oh well. Maybe just continue to wait the 10 ms, or resend if you didn't receive the "stopclock" message. I don't really know what else to tell you since client-battle-bots work fine (in javascript).
Thanks for the reply. I didn't really expect you to do something, but it may give problems in the future so it could be good to know. I'll let you know how the bot progresses. Source should come online eventually.
Update: Learned reading C++ templates. Found the offending lines. Removed the multithreaded guard code. Creates possible bugs, doubles the speed(for me). Now searching for a good solution...