Let's Make Robots!

Error I have never seen before (Picaxe)

I am getting this error whatever code I try to compile, program or when checking syntax --Anyone have any ideas?

main:


Error: Unrecognised escaped char 0x20; will use it anyway.

I have a funny space somewhere? Something ain't right here.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

It's a string that has an escaped space (backslash in front of space). Probably a typo when you tried to escape a quote in the string. Here's a code snippet to reproduce the error:
sertxd("Here's an escaped space \ ")

Check strings in your code in commands that can use strings (data/eeprom, sertxd, ...).

Edit: I just noticed your earlier post where you say you use sertxd. There's a backslash in your ascii drawing and that's what causing the error (I take that you send that over serial with sertxd). If you want to send backslash you have to escape it with another backslash like this:
sertxd("Sending a backslash: \\ ")

I also noticed that Picaxe programming editor has a bug in string handling. You cannot have escaped backslash as last character in a string. That's why I have space as the last character in the example above.

Well done Chris!

I like it when other people come up with new errors :p

I suspect that you have accidently typed a control charactor. They can be generated by pressing control and another key at the same time and are not always visible.

Either that or a new virus???

I have done the repaste thing myself and it has seemed to work in the past but not now. I did however start cutting parts of the code until it would compile. This code is to take different sonar readings and then send them via the sertxd. The sertxd system consists of 11 lines (the hight of the terminal window) with each line corresponding to a distance from the sensor. Here is a little drawing I did in notepad...

...................10..11
.........X........................X
                    8  9
............X..................X
                    5  4
...............X............X
                    3  2
..................X ____ X                   
.........7....6..../    \....1....0
<First Row> 00000000 <Byte> B0
<Fwd Far> 0000      
<Diagonal> 00000000 <Byte> b2
<Hallway> Yes/No : Deadend Yes/No

The numbers and X's correspond to bits set to 1 or 0 based on distance. Sorta a bitmap thing. My terminal sends were really just a ton of if then statements. Really, there were not that many combinations. It liked some of it, it didn't like other parts... I dunno.

 

Try a copy/paste to notepad then recopy/paste back to the editor....never seen that though...

It is always good with some extra space ;)