Problem with query_client_cvar and bots
Posted: 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:
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:
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!
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
[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
[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!