View Single Post
  #9   Spotlight this post!  
Unread 02-11-2006, 22:43
JamesBrown JamesBrown is offline
Back after 4 years off
FRC #5279
Team Role: Engineer
 
Join Date: Nov 2004
Rookie Year: 2005
Location: Lynchburg VA
Posts: 1,280
JamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond reputeJamesBrown has a reputation beyond repute
Re: !HELP! IM STUCK IN A SUBROUTINE!!! !HELP!

Quote:
Originally Posted by Alan Anderson
Code:
	if (rc_dig_in11 = 1) /* 1st Autonomy code */
There's your problem right there. You just tried to assign the value 1 to the variable rc_dig_in11. To test for equality, you must use the == symbol, with two equal signs.

The code you posted will always run the BASH routine. You need to change all those single = to double == in your if and else if statements.
Yep, that would be it.

As a note to any one else who ever needs help the more code you post the better we can help, don't worry about people stealing it, it wont work on our robots anyway.

James
__________________
I'm Back


5279 (2015-Present)
3594 (2011)
3280 (2010)
1665 (2009)
1350 (2008-2009)
1493 (2007-2008)
1568 (2005-2007)