Thread: Syntax Error!
View Single Post
  #1   Spotlight this post!  
Unread 03-02-2006, 15:24
Denz's Avatar
Denz Denz is offline
Registered User
FRC #0772 (Sabre Bytes Robotics)
Team Role: Programmer
 
Join Date: Jan 2006
Location: LaSalle, Ont, Canada
Posts: 66
Denz is on a distinguished road
Send a message via MSN to Denz
Syntax Error!

I'm getting a syntax error on this line:

int Distance_Function(float tilt_angle_rad)
{
if (tracking_initialized == 1)
{
distance_from_wall = (int)(3.162 / tan(tilt_angle_rad));
return(distance_from_wall);
}
}

I'm not really sure I declaired everything right, but can someone help me out? I added math.h and included it in the tracking.c(where this code is from).


float tilt_angle_rad;

tilt_angle_rad = (0.01745) * (((TILT_SERVO - 144) * 25)/50);
Distance_Function(tilt_angle_rad);

I also have that somewhere else in the code. And I declaired my function aswell. Help? Thanks in advance!
__________________
www.sabrerobotics.com