![]() |
Forum Index : Microcontroller and PC projects : TOUCH(DOWN) Problem
Author | Message | ||||
PhilTilson Newbie ![]() Joined: 15/11/2015 Location: United KingdomPosts: 35 |
I have a very odd problem - which I am sure the gurus on this forum will easily explain! I am getting to grips with the Touch side of the MM+ and have a simple routine to detect a touch and change the colour of a character under the touch point. This works fine for individual touches. I then wanted to add a couple of lines so that, while the touch was present, the routine was run continuously in order to allow a 'swipe' across the characters. The relevant part of the code is this: sub PenDown do if touch(y)>159 and touch(y)<168 then xx%=int((touch(x)-169)/6)*6+170 text xx%,160,";","LMN",8,1,rgb(yellow) end if loop if touch(down) end sub As soon as I touch the relevant part of the screen, I get the following message on the console: ![]() This one has me stumped! I have tried rewriting the line in case a stray character got in there somehow, but it still does the same thing. Without the do-loop, all is fine. Any thoughts? |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
try LOOP UNTIL or Do WHILE Jim VK7JH MMedit |
||||
PhilTilson Newbie ![]() Joined: 15/11/2015 Location: United KingdomPosts: 35 |
You are right, of course, Jim that I was using the wrong construction for my DO-WHILE loop. Now that I have corrected that, the program runs. However, I still don't understand the error message! where did the 'å' come from? |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Keywords get tokenised. I expect that 'å' is the token for TOUCH Glad it's working now. Jim VK7JH MMedit |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |