Hey guys.
I have a problem with my plugin, that it logs errors on the error_logs files with a runtime error, stack error ( as you can see in the thread title ).
These are the errors I get:
Code:
L 12/04/2011 - 21:09:36: [AMXX] Displaying debug trace (plugin "pimpdr.amxx")
L 12/04/2011 - 21:09:36: [AMXX] Run time error 3: stack error
L 12/04/2011 - 21:09:36: [AMXX] [0] pimpdr.sma::free_round (line 549)
L 12/04/2011 - 21:09:36: [AMXX] Displaying debug trace (plugin "pimpdr.amxx")
L 12/04/2011 - 21:09:36: [AMXX] Run time error 3: stack error
L 12/04/2011 - 21:09:36: [AMXX] [0] ColorChat2.inc::ColorChat (line 63)
L 12/04/2011 - 21:09:36: [AMXX] [1] pimpdr.sma::free_round (line 549)
L 12/04/2011 - 21:09:36: [AMXX] Displaying debug trace (plugin "pimpdr.amxx")
L 12/04/2011 - 21:09:36: [AMXX] Run time error 3: stack error
L 12/04/2011 - 21:09:36: [AMXX] [0] ColorChat2.inc::Team_Info (line 84)
L 12/04/2011 - 21:09:36: [AMXX] [1] ColorChat2.inc::ColorSelection (line 98)
L 12/04/2011 - 21:09:36: [AMXX] [2] ColorChat2.inc::ColorChat (line 64)
L 12/04/2011 - 21:09:36: [AMXX] [3] pimpdr.sma::free_round (line 549)
And all the error logs are coming from my plugin, pimpdr.sma, on line 549. I tried to check, the server crashed once. I checked the time it crashed and compared it to the error log, it was the same time, meaning it must had made it crash.
This is the public free_round, all it does simply that when you pick up a weapon, it strips it (using client_cmd("weapon_knife") isnt efficient cuz ppl can bug it and still use the weapon) (Activated when someone activates a free round, I guess you know what a free round might be on DEATHRUN plugin)
PHP Code:
public plugin_init()
{
// ......
register_event("CurWeapon", "free_round", "be", "1=1", "2!29");
}
public free_round(id)
{
if ( !is_user_alive(id) || !is_user_connected(id) )
return;
else if ( g_FreeRound )
{
strip_user_weapons(id)
give_item(id, "weapon_knife");
ColorChat(id, RED, "%s ^3You can not ^4switch weapons^3 on a ^4Free Round^3!", PREFIX_COLOR)
}
}
Is there something wrong with what I do?
__________________