![]() |
Re: Need some help for shield support
I'm very sorry PMB but if you don't know I now learning C++ and Light Ninja don't send me any tutorial about this bots.
I will continue E[POD]bot but it will take a time. |
Re: Need some help for shield support
Well you don't have to be sorry for anything, everybody can learn, I was just giving you the necessary hints to solve your problem :)
Did you understand completely my previous post or is there any point you need more explanation for ? Normally you should have enough info to find the bug yourself now ; but if that was not the case, don't hesitate to ask. Always ask precise questions, however. And give us as much info as possible. |
Re: Need some help for shield support
OK PMB I fix all but I can't test the bots becorse I change
void FakeClientCommand(edict_t *pBot, char *arg1, char *arg2, char *arg3) to void FakeClientCommand(edict_t *pBot, const char *fmt, ...) becorce some FakeClientCommand in bots.cpp don't work and now the bots connect but they don't choose a team. What I must do now. |
Re: Need some help for shield support
Why did you change the FakeClientCommand function then ? The problem was not here...
Ensure that ALL bot client commands end with a "\n" (carriage return) at the end. |
Re: Need some help for shield support
I change FakeClient Command becorse the compilator give me a error mesege
" FakeClientCommand cannot convert char* to char* " or " FakeClientCommand cannot convert int to char* " |
Re: Need some help for shield support
...and as I see you did not want to bother understanding what these errors meant, so you decided to change the WHOLE function and just blindly copy'n'paste the one from POD-bot 2.6mm. >:(
That's not the right way to work, dude. EPODbot will go nowhere down this road. If you want this new FakeClientCommand() function to work, you need to also change the Cmd_Argv, args and argc functions, and you also need to redefine g_argv and get rid of the GlobalLock() and GlobalUnlock(). And if you do that you also need to change ALL FakeClientCommand() calls so as to use formatting strings à la printf. Too bad, eh ? You'd BETTER put back the old FakeClientCommand() code and not change stuff you don't understand yet. It's just an advice. hint: data types. |
Re: Need some help for shield support
Yes PMB I copy'n'paste this function from PodBot 2.6mm but I do this becorse that function is used from all bots like :
YaPB PodBot 2.6mm and your bots RACC I don't get code from other bots. I only get shield support from YaPB but the bots don't buy shield. Other code I'm not get from any bots.I continue E[POD]bot from my ideas(very hard becorse I don't understand C++ very good.You know what is the reason.) Now I back old function of FakeClientCommand and I will looking for anoder way to resolve the problem. |
Re: Need some help for shield support
Okay. I assume the old FakeClientCommand is now back in place.
When your compiler gives you errors or warnings it also gives you a line number. If you double-click on that error you are being taken to the line containing the bug. Post these lines so we can see your bugs. I can almost tell what it is, but I won't tell you what to change right now because I want you to understand your error first. |
Re: Need some help for shield support
OK PMB I fix the error and I test the bots and yeah they buy shield but after they buy their weapons the bots stay on one plase 15 sec.
But this change in the weapon system crash my experiment that allow the bots to pickup better pistols. So for now I will looking for a way for the old weapon system becorse Whistler don't change anything of his buy system in YaPB and his bots buy a shield. So if you have other ideas how to get that to work with old weapon system please tell me. |
Re: Need some help for shield support
Quote:
Tell me where I wrong! Now the bots buy shield and all others weapons but after the bots finish with buying they stay in one plase for 15 sec. What I must do to remove this bug. |
Re: Need some help for shield support
The bots stay in place because they are stuck in the buy menu.
The old buy code makes use of a state machine to notify the bots about which menu they're browsing. As soon as a bot enters a menu, its BuyAction state changes. But, when using shortcuts, you don't NEED to enter any menu at all when you buy a weapon. What happens then is that you are waiting for the bot to be in the submenu selection screen (MSG_CS_WEAPONBUY), and then you tell it to buy using a shortcut. Although this gives the bot the right weapon it doesn't make the menu disappear. This is why you must either close this menu (unclean fix) or change the buy function not to make use of the menu messages machine state. |
All times are GMT +2. The time now is 11:21. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.