error: expected constructor, destructor, or type conversion before '(' token

I’m trying to take input from a pin my code is

#include <LiquidCrystal.h>

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
char inpin8 = 8;
pinMode (inpin8, INPUT_PULLUP);
int buttonState = 0;

byte cursor[8] = {
B10000,
B01000,
B00100,
B00010,
B00100,
B01000,
B10000,
};

void setup() {
// set up the LCD’s number of columns and rows:
lcd.clear();
lcd.begin(16, 2);
lcd.print(“Booting”);
delay(5000);
lcd.clear();
lcd.createChar(0, cursor);
lcd.begin(16, 2);
lcd.write(byte(0));

}

void loop() {

buttonState = digitalRead(inpin8);
// check if the pushbutton is pressed. If it is, the buttonState is HIGH:
if(buttonState = 1) {

} else {

}
delay(5);
}
but every time I try to upload it to my Arduino it gives me this error

/tmp/044310553/UNOS/UNOS.ino:8:9: error: expected constructor, destructor, or type conversion before ‘(’ token

exit status 1

can someone show me what I did wrong

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
char inpin8 = 8;
int buttonState = 0; 

byte cursor[8] = 
{
    B10000,
    B01000,
    B00100,
    B00010,
    B00100,
    B01000,
    B10000,
};
void setup() {
    pinMode (inpin8, INPUT_PULLUP); //Moved
  // set up the LCD's number of columns and rows:

    lcd.clear();
    lcd.begin(16, 2);
    lcd.print("Booting");
    delay(5000);
    lcd.clear();
    lcd.createChar(0, cursor);
    lcd.begin(16, 2);  
    lcd.write(byte(0));
  
}


void loop() 
{
  
    buttonState = digitalRead(inpin8);
     // check if the pushbutton is pressed. If it is, the buttonState is HIGH:
    if(buttonState = 1) 
    {

    } 
    else 
    {

    }
    delay(5);
}

pinMode (inpin8, INPUT_PULLUP) must be inside a function, like in setup()

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom.. :)