View unanswered posts | View active topics It is currently Sat Oct 31, 2020 6:50 pm

Reply to topic  [ 3 posts ] 
threshold error 
Author Message

Joined: Thu Mar 13, 2014 2:39 pm
Posts: 5
Post 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

Thu Mar 13, 2014 3:01 pm

Joined: Thu Jan 03, 2013 5:10 pm
Posts: 207
Location: The plateau north of the Ohio River Valley, also known as Cave Country.
Post Re: threshold error
Have you initialized the variable "threshold" in your code anywhere? Like this:

int threshold;
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

Thu Mar 13, 2014 4:37 pm

Joined: Thu Mar 13, 2014 2:39 pm
Posts: 5
Post Re: threshold error
yep that was the problem
thanks buddy

Thu Mar 13, 2014 4:39 pm
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

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

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.