Quote:
Originally Posted by jeremyvillanueva
Hi, FAQU, so much thanks for your work,
I'm using but I have more than 100 words on my banned words list
This is the error in the log:
L 01/21/2021 - 04:10:06: [SM] Exception reported: Array index out-of-bounds (index 100, limit 100)
L 01/21/2021 - 04:10:06: [SM] Blaming: simple-filters.smx
L 01/21/2021 - 04:10:06: [SM] Call stack trace:
L 01/21/2021 - 04:10:06: [SM] [1] Line 542, D:\plugins by FAQU\learning\Simple-Filters\pentru alliedmods si github\scripting\simple-filters.sp::GetFilters
L 01/21/2021 - 04:10:06: [SM] [2] Line 118, D:\plugins by FAQU\learning\Simple-Filters\pentru alliedmods si github\scripting\simple-filters.sp::OnConfigsExecuted
I want to ask, may you help me, is 100 the limit?
I traced to this function:
else BreakString(line, chatfilters[i], sizeof(chatfilters[]));
I was trying to fix it, but I want to know more about that constant number 100,
and how does BreakString works
Thanks
|
Currently the plugin allows up to 100 filters with a max of 50 characters each.
The actual error that you are getting is: "Array index out-of-bounds (index 100, limit 100)"
This means that the array (buffer) which is used for storing the filters is not big enough to store the amount of data that you want it to.
If you plan on using more than 100 chat filters, just modify the variable "char chatfilters[100][50];" to suit your needs, and recompile.
Example:
PHP Code:
char chatfilters[150][70]; // 150 filters with a max of 70 characters each
__________________