View Single Post
Author Message
Abhinash
Senior Member
Join Date: Jan 2015
Location: India,kolkata
Old 11-18-2020 , 13:21   Invalid index 0 (count 0) help me fix it
Reply With Quote #1

I am getting invalid index 0 (count 0) in this part of code --
Code:
new i
for ( i = 0; i < sizeof g_cHumanModels; i++ )
    {
          ArraySetString(model_human, i, g_cHumanModels[i])
    }
This loop is inside plugin_precache() and model_human = ArrayCreate( 32, sizeof g_cHumanModels )

This is g_cHumanModels part -
Code:
new const g_cHumanModels[][] =
{
    "model_one",
    "model_two",
    "model_three",
    "model_four"
}
Whats my mistake and how to fix it ?

Last edited by Abhinash; 11-20-2020 at 09:50. Reason: corrected codes
Abhinash is offline