View Single Post
  #1   Spotlight this post!  
Unread 08-03-2009, 08:58
awad1992 awad1992 is offline
Registered User
FRC #1946
 
Join Date: Dec 2008
Location: israel
Posts: 3
awad1992 is an unknown quantity at this point
help with c++ code

hello!
im from team 1946 in israel i just want to ask if we can do more than one (else if) in the same code

in other words , is it correct ?

if(!limitswitch1->Get())
jaguar1->Set(0.0);
Wait(0.05);
jaguar1->Set(0.5);
Wait(0.5);
jaguar1->Set(0.0);
else if (!limitswitch2->Get())
jaguar1->Set(0.0);
Wait(0.05);
jaguar1->Set(-0.5);
Wait(0.5);
jaguar1->Set(0.0);
else if (!limitswitch3 & leftStick->GetRawButton(10)
jaguar1->Set(0.0);
else jaguar1->Set(leftStick->GetZ() );

thanks
Reply With Quote