Line following with magnetic sensor

please edit your post to add [code][/code] around your code.

#define SW 9      // limit switch

#define MS 8      // magnetic sensor
#define LS 2      // left sensor
#define RS 3      // right sensor

Long variable names are not stored on the Arduino. There's no penalty for longer names. You should take these comments and use them as the variable names instead of the 2-letter names. (Well, these are constants, but it's the same thing.)

Where did you learn goto? It is almost NEVER required in any C or C++ program. You should be able to write programs for your whole life and only use goto once or twice.