Method for Drive Train (coding help) (v5 using VCS)


I was coding a drive train method for my robot that calculates the linear displacement of the robot with respect to the size of the wheels and the target distance I want. There is a screenshot of the code attached to this. For some reason, it won’t compile and I’m relatively new to c++ so using proper vocabulary with me won’t be very helpful. Can someone explain why this doesn’t compile and how I would call this method during autonomous?
Screen Shot 2019-01-07 at 9.27.42 AM.png


I just fixed it. After I posted this I realized I defined the variables in the wrong order. Anyways, one of my questions remain, how would I call the drivetrain method? (updated code attached here). It doesn’t compile when I try doing what I believe is correct.
Screen Shot 2019-01-07 at 9.32.02 AM.png


Sorry again, this is now the most up to date code. Same question though.
Screen Shot 2019-01-07 at 9.34.06 AM.png


Can you send a screenshot of what the error says?


I’m not sure but I think I also might have had issues doing “-right” or “-left”. Maybe don’t do that.


It wasn’t that


I think I fixed it, I was calling the method outside of the autonomous which confused the program to think I was defining another variable when in fact I wasn’t. When I put it in the autonomous no errors pop up.


Well I’m glad you were able to figure it out.