If what you want is “drive forward 200mm, then turn right 270 degrees”, you can do that with just two blocks:
The issue is that the heading is probably never going to hit 270 flat. It only updates heading after a certain amount of time, and it’s likely to overshoot. Simple fix would be to change heading = 270 to heading > 270.
same outcome 20chars
because of motor drift, it will go between 268 and 272. and i want it to be exact
If statements usually check the moment that the code reaches that point. Once it starts turning right, it will check if the heading = 270. Since it isn’t at that very moment, it moves on to the next line of code. You can use a wait until or a while depending on what you are trying to accomplish. Try that and see if it works out.