Quote:
Originally Posted by knocker
hmmm my server writes this into the logs:
L 12/15/2004 - 14 3 9: [AMXX] To enable debug mode, add " debug" after the plugin name in plugins.ini (without quotes).
L 12/15/2004 - 14 3:42: [AMXX] Run time error 4 (index out of bounds) (plugin "CDPunisher.amxx") - debug not enabled.
this repeats around 10 times per second
furthermore it didnt prevent no-cd people from buying things (caused by this bug?) ...
|
I think I have found where the bug
at line 124 of
cdpunisher.sam new restricted_weapons[32] //[weapon_index][code] you should change the [32] to [37]
at line 214
restricted_weapons[31] = 0 // Unused
comment this line with // then add the word blow
restricted_weapons[31] = get_cvar_num("cdpunish_nvgs")
restricted_weapons[32] = get_cvar_num("cdpunish_defuser")
restricted_weapons[33] = get_cvar_num("cdpunish_vest")
restricted_weapons[34] = get_cvar_num("cdpunish_vesthelm")
restricted_weapons[35] = get_cvar_num("cdpunish_primammo")
restricted_weapons[36] = get_cvar_num("cdpunish_secammo")
then recompile it.
reason:
there is a for loop at line 436
for(new i=0;i<37;++i)
at line 479 "i" is used as index of restricted_weapons
if(equal(wname, arg) && restricted_weapons[i] != 0 && cdauthrecords[id] != 0)