In the CAPX bellow you will be able to see that when you click on the empty square that is surrounded by 0s that a power line will be placed. Once placed, the code will assess the tiles, and if there is a powerline next to a 0 tile, it will change it to a tile from 1-9.
The only problem is that it only works for the tiles above and to the left of the powerline. If you disable the Else clause then it will work fine, but I need that there to ensure if I remove a powerline, that the tiles will go back to be 0s.
Can anyone take a look and see where the error in my code is, please ?