New to the language.....getting an expected unqualified id before unsignederror

Here is my code below. Can someone please tell me what is wrong?

//  This program cycles through the first 5 files loaded onto a WT588D-16P Sound Module

//  The pins labeled on the data sheet as CLK, DI, DO, CS, REST are for programming
//  the module via the external USB programmer.
// In the Waytronic VoiceChip beta software, the settings are configured as "Control Mode: Three Line Mode, and Busy Mode: LOW"


#define WT588D_RST 7 //Module pin "REST" or pin#1
#define WT588D_CS 6 //Module pin "P02" or pin#11
#define WT588D_SCL 9 //Module pin "P03" or pin#10
#define WT588D_SDA 8 //Module pin "P01" or pin#12
#define WT588D_BUSY 10 //Module pin "LED/BUSY" or pin#15

byte file_count = 1;

void setup() {
  // put your setup code here, to run once:.
//  This code is to activate the Arduino internal pull-up resistor


//  This code begins the WT588D program run

pinMode (WT588D_RST, OUTPUT);
pinMode (WT588D_CS, OUTPUT);
pinMode (WT588D_SCL, OUTPUT);
pinMode (WT588D_SDA, OUTPUT);
pinMode (WT588D_BUSY, INPUT);

digitalWrite(WT588D_CS, HIGH);
digitalWrite(WT588D_RST, HIGH);
digitalWrite(WT588D_SCL, HIGH);
#define WT588D_Send_Command

}

void loop() {
  // put your main code here, to run repeatedly:

{

}


WT588D_Send_Command(file_count);

file_count++;

if(file_count == 5) file_count = 0;

delay(50); //give the module time to start playing

while(digitalRead(WT588D_BUSY) == 0) { }

delay(200);

}

void WT588D_Send_Command(unsigned char addr) {
 

unsigned char i ;
digitalWrite(WT588D CS,LOW);
delay(5); //delay per device specifications
 
  for( i = 0; i < 5; i++); {
    digitalWrite(WT588D_SCL, LOW);
    if(bitRead(addr, i))digitalWrite(WT588D_SDA, HIGH);
    else digitalWrite(WT588D_SDA, LOW);
    delay(2); //delay per device specifications
    digitalWrite(WT588D_SCL, HIGH);
    delay(2); //delay per device specifications
  } //end for

   digitalWrite(WT588D_CS, HIGH);

} //end WT588D_Send_Command

You have an extra } in setup().

What the heck is #define WT588D_Send_Command
supposed to be?

  for( i = 0; i < 5; i++);

The body of the for loop is the ;. The ; is a no-op. Is that really what you want?

I don't know what the other posters are complaining about. Obviously none of them pasted the code into the IDE and reformatted it. Too bad you couldn't be bothered doing that before posting it.

You have a useless set of curly braces in loop with no code in between. Get rid of that crap.

Put EVERY { on a new line ALL BY ITSELF.
Put EVERY } on a new line ALL BY ITSELF.
Use Tools + Auto Format.

The #define statement IS causing problems. I deleted it, and fixed the digitalWrite() statement in the WT588D_Send_Command function, and then your code compiled.

Here is my code below. Can someone please tell me what is wrong?

Can you please post your error message?

Thank you all for your help. As for the #define WT588D_Send_Command, I just added it in and it moved the error to another line of code, so I thought that fixed it, without fully understanding what the code meant.....now I do!

Paul S - You said you fixed the "digitalWrite() statement in the WT588D_Send_Command function". How did you fix it?

Here is my updated code with some syntax corrections. Will this work okay?

/*
This program cycles through the first 5 files loaded onto a WT588D-16P Sound Module

The pins labeled on the data sheet as CLK, DI, DO, CS, REST are for programming
the module via the external USB programmer.
In the Waytronic VoiceChip beta software, the settings are configured as "Control Mode: Three Line Mode, and Busy Mode: LOW"
*/

#define WT588D_RST 7 //Module pin "REST" or pin#1
#define WT588D_CS 6 //Module pin "P02" or pin#11
#define WT588D_SCL 9 //Module pin "P03" or pin#10
#define WT588D_SDA 8 //Module pin "P01" or pin#12
#define WT588D_BUSY 10 //Module pin "LED/BUSY" or pin#15

byte file_count = 1;

void setup()
{
//This code begins the WT588D program run

pinMode (WT588D_RST, OUTPUT);
pinMode (WT588D_CS, OUTPUT);
pinMode (WT588D_SCL, OUTPUT);
pinMode (WT588D_SDA, OUTPUT);
pinMode (WT588D_BUSY, INPUT);

digitalWrite(WT588D_CS, HIGH);
digitalWrite(WT588D_RST, HIGH);
digitalWrite(WT588D_SCL, HIGH);
}

void loop()
{

WT588D_Send_Command(file_count);

file_count++;

if(file_count == 5) file_count = 0;

delay(50); //give the module time to start playing

while(digitalRead(WT588D_BUSY) == 0)
{
}
delay(200);
}

void WT588D_Send_Command(unsigned char addr)
{
unsigned char i;
digitalWrite(WT588D CS, LOW);
delay(5); //delay per device specifications

for( i = 0; i < 5; i++)
{
digitalWrite(WT588D_SCL, LOW);
if(bitRead(addr, i))digitalWrite(WT588D_SDA, HIGH);
else digitalWrite(WT588D_SDA, LOW);
delay(2); //delay per device specifications
digitalWrite(WT588D_SCL, HIGH);
delay(2); //delay per device specifications
}
//end for

digitalWrite(WT588D_CS, HIGH);

}
//end WT588D_Send_Command

Paul S - You said you fixed the "digitalWrite() statement in the WT588D_Send_Command function". How did you fix it?

You do not have a variable called "WT588D CS", because you can't. You do have one called "WT588D_CS", so I assumed that that was the pin you wanted to diddle with.

Please use code tags.

Read this before posting a programming question

Please edit your post, select the code, and put it between [code] ... [/code] tags.

You can do that by hitting the "Code" icon above the posting area. It is the first icon, with the symbol: </>

How to use this forum

PaulS:
You do not have a variable called "WT588D CS", because you can't. You do have one called "WT588D_CS", so I assumed that that was the pin you wanted to diddle with.

Okay. Thank you!