Been away so only just got back to looking at your post. You may have fixed it by now but...
- Code: Select all
if (r = 4 and c = 3)
In this code, you want '==' to make a comparison. A sigle'=' is an assignment. Also you might want to put brackets around each of the comparisons to make sure the 'and' is not taking precedence.