![]() |
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 |
Re: help with c++ code
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() ); } yes, as long as you have {} |
Re: help with c++ code
thank you very much
|
| All times are GMT -5. The time now is 13:37. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi