Write Beyond Allowed Access Area???

What this is suppose to do is get the tile actor that is under all the other actors above it. But I keep getting a write error.
- Code: Select all
void MoveFloorRight(int playerNode, int VIEW_MH, int VIEW_MW)
{
Actor *MyActor;
Actor *NotTile[100];
int notTileCount = -1;
int Stop_Loop;
int tID;
int i;
char tAnim[20];
for(i = (-VIEW_MH/2); i < VIEW_MH/2 +1; ++i)
{
tID = playerNode + (g_MapWidth * i) - VIEW_MW/2;
MyActor=getactor(g_NodeWorldX[tID], g_NodeWorldY[tID]);
Stop_Loop = 0;
while((MyActor->name != "ISO_FloorTile" || MyActor->name != "SQ_FloorTile") && Stop_Loop < 10)
{
notTileCount = notTileCount + 1; // This should equal 0 after first addition.
NotTile[notTileCount] = MyActor; //ERROR HERE
ChangeZDepth(MyActor->clonename, 0);
ChangeParent(MyActor->clonename, "none");
MyActor=getactor(g_NodeWorldX[tID], g_NodeWorldY[tID]);
++Stop_Loop;
}
tID = tID + VIEW_MW;
MyActor->x = g_NodeWorldX[tID];
MyActor->y = g_NodeWorldY[tID];
sprintf(tAnim, "tile%i", g_Map[g_NodeY[tID]][g_NodeX[tID]]);
ChangeAnimation(MyActor->clonename,tAnim,NO_CHANGE);
}
for(notTileCount; notTileCount > -1; --notTileCount)
{
ChangeParent(NotTile[notTileCount]->clonename, "view");
}
}