This is still a work in progress.
The Section variable should be changed before switching the costume, not after. Also, you were changing the sections backwards. For example, going left was adding 1 when it should have been subtracting 1.