1The name is a plain variable, not an array
int total declares one number. int total[3] declares three. Add the size where the variable is made.
void setup() {
Serial.begin(9600);
int total = 7;
Serial.println(total[0]);
}
void loop() {
}void setup() {
Serial.begin(9600);
int total[3] = {7, 8, 9};
Serial.println(total[0]);
}
void loop() {
}Mokxi’s build tab says: Square brackets [ ] go after an array, and this is a single value.