destroy actor on collision -help-

Does anybody know what is wrong with my code?
I am trying to make it so when an actor is created it checks to see if it is on top of my background tile actors. If it is then it is supposed to delete itself, but it is not working.

I am trying to make it so when an actor is created it checks to see if it is on top of my background tile actors. If it is then it is supposed to delete itself, but it is not working.
- Code: Select all
int qq;
int i;
Actor *actors;
actors = getAllActorsInCollision("Event Actor", &qq);
if(actors)
{
for(i = 0; i < qq; i++)
{
if ( strcmp(actors[i].name, "background_tiles")==1 )DestroyActor("Event Actor");
}}
