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
Thu Mar 13, 2014 3:01 pm
Joined: Thu Jan 03, 2013 5:10 pm Posts: 199 Location: The plateau north of the Ohio River Valley, also known as Cave Country.
Re: threshold error
Have you initialized the variable "threshold" in your code anywhere? Like this:
int threshold; //or float threshold;
That error shows up when you try to read from a variable that you never created.
_________________ I'm not a robot! I'm british! ~ quote from an asparagus I am not a robot! I am a unicorn! ~ quote from a robot
Users browsing this forum: No registered users and 2 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum