First upload will not

The message in red at the bottom reads 'expected declaration before '}' token.
It's the coding is from the Roboremo app to run my model train via Bluetooth.
I have just finished the little electronic board (did electronics 101 in 1970 YIKES) and tried my first ever upload - very very noobie.
Must I paste the coding here?
Pse help?
Thks in advance,
George

Must I paste the coding here?

No, of course not - we're all psychic.

(deleted)

Tried it but no go.
Here’s the coding:
#define bluetooth Serial

int motorSpeedPin = 9; // pin 9 (PWM) to contorl motor speed

char cmd[100];
int cmdIndex;

void exeCmd() {

if( cmd[0]==‘s’ &&
cmd[1]==‘p’ &&
cmd[2]==‘e’ &&
cmd[3]==‘e’ &&
cmd[4]==‘d’ &&
cmd[5]==’ ’ ) {

int val = 0;
for(int i=6; cmd*!=0; i++) { // number begins at cmd[6]*
_ val = val10 + (cmd-‘0’);_
_
}_
_
// if cmd is “speed 100”, val will be 100 _
_
analogWrite(motorSpeedPin, val);_
_
}*_

}
void setup() {

* delay(500); // wait for bluetooth module to start*
* bluetooth.begin(115200); // Bluetooth default baud is 115200*

* pinMode(motorSpeedPin, OUTPUT);*
* analogWrite(motorSpeedPin, 0);*

* cmdIndex = 0;*
}
void loop() {

* if(bluetooth.available()) {*

* char c = (char)bluetooth.read();*

* if(c==’\n’) {*
* cmd[cmdIndex] = 0;*
* exeCmd(); // execute the command*
* cmdIndex = 0; // reset the cmdIndex*
* } else { *
* cmd[cmdIndex] = c;*
* if(cmdIndex<99) cmdIndex++;*
* }*

* }*

made some changes now I get 'expected initializer before 'if' ??
thks

(deleted)

…and remember to use code tags when posting code

Ok but of course I started making changes by removing 'n' and substituting with 'i' so now I'am lost.
I'll put the original code back and do as you suggest BTW how many } must be at the end?
Thks

how many } must be at the end?

Just enough to balance the {

Ok, I'll check with a fine toothcomb - I remember from my Fortran days as a student when we still used punch cards haha etc
VOILA success!!
Many many thks!!