|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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 {} |
|
#3
|
|||
|
|||
|
Re: help with c++ code
thank you very much
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HELP WITH CODE!!! :( | nick_champ_2 | Technical Discussion | 6 | 16-01-2009 01:57 |
| Help with Hybrid code | ShotgunNinja | Programming | 1 | 15-02-2008 13:42 |
| Help with VB code | Setsanto | Programming | 8 | 08-02-2007 16:04 |
| Help with code | b-rant | Programming | 1 | 05-04-2006 13:52 |
| hey need some help with writing a code please help me here | magical hands | Programming | 9 | 01-01-2004 21:46 |