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

// 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()