Was trying this pneumatic code:
/// #include “vex.h”
using namespace vex;
int main() {
// Initializing Robot Configuration. DO NOT REMOVE!
vexcodeInit();
float myVariable;
// “when started” hat block
int whenStarted1() { $$$
DigitalOutA.set(false);
return 0;
}
// “when Controller1 ButtonA pressed” hat block
void onevent_Controller1ButtonA_pressed_0() {$$$
DigitalOutA.set(true);
}
// “when Controller1 ButtonB pressed” hat block
void onevent_Controller1ButtonB_pressed_0() {$$$
DigitalOutA.set(false);
}
int main() {$$$
// register event handlers
Controller1.ButtonA.pressed(onevent_Controller1ButtonA_pressed_0);
Controller1.ButtonB.pressed(onevent_Controller1ButtonB_pressed_0);
}
}
///
but an error message appears on lines 27,33,38,43 saying function definition is not allowed here
I have marked these lines with triple dollar sign: $$$