The idea is to only have the forward running when you need it. Example code:
Code:
#include <amxmodx>
#include <fakemeta>
new fwdTraceLine;
public plugin_init()
{
register_concmd("register","register");
register_concmd("unregister","unregister");
}
public register(id)
{
fwdTraceLine = register_forward(FM_TraceLine,"fw_traceline",1);
console_print(id,"* Registered FM_TraceLine: %i",fwdTraceLine);
return PLUGIN_HANDLED;
}
public unregister(id)
{
console_print(id,"* Unregistering FM_TraceLine: %i -- Result: %i",fwdTraceLine,unregister_forward(FM_TraceLine,fwdTraceLine,1));
fwdTraceLine = 0;
return PLUGIN_HANDLED;
}
public fw_traceline(Float:start[3],Float:end[3],noMonsters,id,trace)
{
return FMRES_IGNORED;
}
Code:
] register
* Registered FM_TraceLine: 369
] unregister
* Unregistering FM_TraceLine: 369 -- Result: 1
This works alright. But then, once I add a bot:
Code:
] bot_add_ct
"bot_quota" changed to "1"
bot] Alfred connected
bot] Alfred is joining the Counter-Terrorist force
Scoring will not start until both teams have players
L 01/27/2007 - 21:07:31: [AMXX] Forwards with more than 32 parameters are not supported (tried to prepare array # 33).
L 01/27/2007 - 21:07:31: [AMXX] Forwards with more than 32 parameters are not supported (tried to prepare array # 33).
L 01/27/2007 - 21:07:31: [AMXX] Forwards with more than 32 parameters are not supported (tried to prepare array # 33).
Rinse and repeat the error message. The error stops appearing if I register the forward again, or remove the bot. I'm not sure if this only occurs with bots or with any other clients besides the host.
I'm using AMXX 1.76c on a CZ listen server. I've tried this running only the exampe plugin (not even any of the AMXX base plugins), and it still occurs, albeit the forward index is much lower.
__________________