ROBOTC.net forums
http://www.robotc.net/forums/

threshold error
http://www.robotc.net/forums/viewtopic.php?f=1&t=8213
Page 1 of 1

Author:  kimbertactpro9 [ Thu Mar 13, 2014 3:01 pm ]
Post subject:  threshold error

im pretty new to this so don't give me a hard time
i'm wrote the basic tank drive code from a video tutorial on YouTube but i got this error:
Undefined variable 'threshold'. 'short' assumed.
and and this the line i wrote: if(abs(joystick.joy1_y1)>threshold)
i checked on the video and several forum post and everything right so i dont know whats wrong

Author:  Coder A [ Thu Mar 13, 2014 4:37 pm ]
Post subject:  Re: threshold error

Have you initialized the variable "threshold" in your code anywhere? Like this:

Code:
int threshold;
//or
float threshold;


That error shows up when you try to read from a variable that you never created.

Author:  kimbertactpro9 [ Thu Mar 13, 2014 4:39 pm ]
Post subject:  Re: threshold error

yep that was the problem
thanks buddy

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/