Quote:
Originally Posted by ph
Thank you.
However I am getting this error message under logs:-
Is there a fix ?
|
I'm brand new to this, but looking at the code it doesn't like the Handle.
The DoBotName() function is called at line 502, so then we go to to that function and it is throwing an error on this specific line.
Code:
int loaded_names = GetArraySize(bot_names);
It is trying to get a count for how many bots there are, but it doesn't like the bot_names Handle. It is declared up on line 23.
The odd thing is that we have a check if the Handle is invalid, and if so, to create the array. So my best guess would be that DoBotName() is somehow being called before we actually call ReloadNames() and create the array, but ReloadNames() is called when the map is first started so that doesn't make sense.
Code:
void ReloadNames()
{
// reset name list position
next_index = 0;
// create -- or clear -- the name array
if (bot_names != INVALID_HANDLE)
{
ClearArray(bot_names);
} else {
bot_names = CreateArray(MAX_NAME_LENGTH);
}
Maybe this would be fixed by adding to ReloadNames(); OnPluginStart()?
You can try this and I'm also going to test it myself.