Problem with query_client_cvar and bots

Read log files for errors! If this fails, come here for help

Moderator: Forum Moderator

Locked
User avatar
Corrosion X
Peon
Posts: 16
Joined: Sun Dec 04, 2005 3:08 pm
Location: Fullerton, CA
Contact:

Problem with query_client_cvar and bots

Post by Corrosion X » Sun Dec 04, 2005 4:09 pm

Hopefully Geesu will see this and add the fix in v2.3.0.

The problem is with AMXX V1.60, wc3ft v2.2.9 (and probably lower versions) running on windows XP with listen server, PODbot version 2005.2.15.0 :
When the bots are being created this is what it says in console for every bot, but not for any human players:

Code: Select all

L 12/04/2005 - 11:56:55: Player 2 is either not connected or a bot
L 12/04/2005 - 11:56:55: [AMXX] Displaying debug trace (plugin "warcraft3FT.amxx")
L 12/04/2005 - 11:56:55: [AMXX] Run time error 10: native error (native "query_client_cvar")
L 12/04/2005 - 11:56:55: [AMXX]    [0] warcraft3FT.sma::client_putinserver (line 361)
Creating bot...
Kugelfang connected
Kugelfang is joining the Counter-Terrorist force
L 12/04/2005 - 11:56:55: Player 3 is either not connected or a bot
L 12/04/2005 - 11:56:55: [AMXX] Displaying debug trace (plugin "warcraft3FT.amxx")
L 12/04/2005 - 11:56:55: [AMXX] Run time error 10: native error (native "query_client_cvar")
L 12/04/2005 - 11:56:55: [AMXX]    [0] warcraft3FT.sma::client_putinserver
This is what is on the line #361 in warcraft3FT.sma:
[small]query_client_cvar(id, "cl_minmodels", "check_cvars")[/small]

Problem is that query_client_cvar(id) cant be a bot, else it errors like you saw. Please add this coding to it...
[small]if(is_user_bot(id)==1)return PLUGIN_CONTINUE[/small]
before the line. Just added it and tested it. Compiles with no errors and works with no problems.

This is the what it displays in the console now:

Code: Select all

Creating bot...
killaruna connected
killaruna is joining the Counter-Terrorist force
Creating bot...
Botsie Collins connected
Botsie Collins is joining the Counter-Terrorist force
Creating bot...
U're Dead connected
U're Dead is joining the Terrorist force
Creating bot...
Polymorph connected
Polymorph is joining the Counter-Terrorist force
Creating bot...
Make me Laugh connected
Make me Laugh is joining the T
The public client_putinserver(id) starting on line #345 should now look like this:

[small]
public client_putinserver(id){
#if ADVANCED_DEBUG
writeDebugInfo("client_putinserver",id)
#endif

p_data_b[id][PB_ISCONNECTED] = true

#if MOD == 1
p_data[id][P_MONEY] = iCvar[DOD_STARTMONEY]
new parm[3]
parm[0] = id
parm[1] = 0
_DOD_showMoney(parm)
#endif
if(is_user_bot(id)==1)return PLUGIN_CONTINUE
#if MOD == 0
query_client_cvar(id, "cl_minmodels", "check_cvars")
#endif
return PLUGIN_CONTINUE
}
[/small]

Please add it to next update. Thanks Geesu!

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Mon Dec 05, 2005 8:20 am

Good thinking :) Will add it to 2.3.0

Also, don't expect the querying to work until AMXX releases the next version (valve updated the code so it changed the funtionality)
No Support via PM

User avatar
Corrosion X
Peon
Posts: 16
Joined: Sun Dec 04, 2005 3:08 pm
Location: Fullerton, CA
Contact:

Post by Corrosion X » Mon Dec 05, 2005 7:48 pm

Hey, no worries. Not worried about the query at all. Just love bug testing and love fixing problems. Happened to install PODbot for the first time to test new plugins and it gave me errors so ran it in debug and since i know enought coding to fix problems and tweak plugins, worked out well. Thank you for such a wonderful MOD btw.

And you may want to lock this thread.

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Mon Dec 05, 2005 10:22 pm

TY
No Support via PM

Locked