Failed compile file code.cpp


#1

Hi,
I am trying to upload a program to my Mbot Ranger, and it always gives me an error
Failed to compile file code.cpp
Arduino build failed.

I running a win 10 1803 version


#2

Can you share your code?


#3

Which code?


#4

The program you’re trying to upload, and the steps you’ve taken to get there, i.e. what devices have you added? Are you doing this as upload or lie? If upload, did you start your code with ‘When Mbot Ranger (Auriga) starts up’ block.

Just need a bit more information on what you’re trying to do


#5


The device that we tried to upload is “Mbot Ranger”. When we select to live all working well.
but when we try to upload to the robot Its fails with the error that I upload the previous comment.
I also upload the code that the teacher tried to upload.


#6

If you are going into ‘Upload’ mode, replace the ‘When green flag is clicked’ block with the 'When Mbot Ranger (Auriga) starts up’ block.

You’ll notice that the ‘green flag’ block is orange in LIVE mode but goes grey in UPLOAD mode, that’s because it’s an invalid block, some EVENT blocks only work in one mode or the other. If your code doesn’t start with ‘When Mbot Ranger (Auriga) starts up’ in UPLOAD mode, then it doesn’t generate any code, and that’s why you get the error.

The system could do with a bit more intelligent error handling, but it is what it is.


#7

thanks i will try that on sunday


#8

H,
It`s was very helpful thanks