Error message invalid types

I am trying an example sketch, however it produces an arror :

invalid types int[int] for array subscript. The video I saw ran without error?

The error breakpoint is this line

if ( digitalRead(bts*)==HIGH) {*
Hoping a simple fix, thanks
```
*int nbts = 3;
int bts = 3;
boolean btgs[3];
int startpin = 7;

void setup() {
Serial.begin(9600);
for (int i = 0; i <nbts; i++) bts[i] = i + startpin;
for (int i = 0; i <nbts; i++) btgs[1] = false;
for (int i = 0; i <nbts; i++) pinmode(bts[i], INPUT_PULLUP);
}

void loop() {
for (int i = 0;  i <nbts; i++) {
if (!btgs[i]) {
if ( digitalRead(bts[i])==LOW) {
Serial.print("bt" + String(i) + ":");
Serial.print(1);
btgs[i] = true;
}
}
else {

if ( digitalRead(bts[i])==HIGH) {
Serial.print("bt" + String(i) + ":");
Serial.print(0);
btgs[i] = false;

}
}
}
delay(15)
}*
```

bts is an int. You are trying to reference it as though it was an array of ints. Why?

for (int i = 0; i <nbts; i++) bts[i] = i + startpin;

bts is not an array, it is declared as a single integer

Thanks both. I simply copied this sketch from a YouTube tutorial, the guy showed it working on his arduino.

One would think seeing it you'd believe it?

Now I will look for another tutorial that works, thanks

At what point exactly in the video did you see the code that you posted ?
At about 5:05 you can clearly see the arrays.

Egg on my face!

Thanks. I was handwriting the code during the tuition, the guy was flipping backwards and forwards between 2 sketches (i think to remind himself) that I misread the line.

Gone away to dig a hole :frowning: