View Single Post
  #5   Spotlight this post!  
Unread 06-03-2015, 08:16
ashb1025 ashb1025 is offline
Registered User
FTC #6095
 
Join Date: Feb 2014
Location: New Castle, IN
Posts: 11
ashb1025 is an unknown quantity at this point
Re: Autonomous Programming Help

The parameter list is fine I just don't know how to add 2 parameters to 1 function, it works fine if I just have the ntime parameter, but I want to be able to specify the speed of the motors in the main task of the program without changing the function code itself so that I don't have 30+ programs telling it to drive forward. Kinda like this

task main()
{
goForward(50,1000)
{

basically saying that the motor should run at 50% power for 1000 milliseconds
but I don't know how to set a parameter to the power percentage of the motor when I'm writing the code for the function.

and it doesn't even let me run the code it's a compiler error