I have this:
Code:
public void RemovePluginZoneTypes(const char[] sPlugin)
{
ZoneTypeObject ZoneType;
PrintToChatAll("this.length = %d", this.Length);
for(int i; i < this.Length; i++)
{
this.GetArray(i, ZoneType);
PrintToChatAll("i = %d", i);
if(StrEqual(sPlugin, ZoneType.Plugin))
{
this.Erase(i);
PrintToChatAll("Zone type by %s was found, removed.", sPlugin);
}
}
}
I expect it to iterate for 3 times, as is the length. But it only iterates 2 times. (The if statements is true for each iteration)
I assume each time an index is erased the length is smaller. Am i miss understanding or is that value not static? I swear I've done similar things with ArrayLists without issue.
Edit: Ran a test with C++ and turns out it does change the value. Looks like I need to review some of my plugins then. Sorry for the waste of a post.