I think this is your problem
I think what you are trying to do is set both values to 0, but instead what you are doing is an equality test with the second value, oring the result with 0 and then storing that in the first value. Essentially changing nothing.
I believe you want this.
If FactoryMapTest[(x + 20) / 32, y / 32 + 1].id = 1 or FactoryMapTest[(x - 18) / 32 + 1, y / 32 + 1].id = 1 TTile2.PlatformOnCount:-1 '********* PROBLEM WITH NEXT LINE ***************** FactoryMapTest[(x + 20) / 32, y / 32 + 1].id = 0 or FactoryMapTest[(x - 18) / 32 + 1, y / 32 + 1].id = 0 End If
I think what you are trying to do is set both values to 0, but instead what you are doing is an equality test with the second value, oring the result with 0 and then storing that in the first value. Essentially changing nothing.
I believe you want this.
If FactoryMapTest[(x + 20) / 32, y / 32 + 1].id = 1 or FactoryMapTest[(x - 18) / 32 + 1, y / 32 + 1].id = 1 TTile2.PlatformOnCount:-1 FactoryMapTest[(x + 20) / 32, y / 32 + 1].id = 0 FactoryMapTest[(x - 18) / 32 + 1, y / 32 + 1].id = 0 End If