Joystick_ does not name a type (please help)

Hello, I have been trying to setup loadcell with arduino micro into joystick. I am an absolute newbie in arduino software, so I downloaded sketch, installed included library into Documents - Arduino - Libraries. But I am getting an error Joystick_ does not name a type. I tried to google for some solution. I found some, but none of them worked for me. Here I am getting that error :
Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID, and here is the code :

#include <HX711_ADC.h>
#include “Joystick.h”

String a;
bool calibration_routine_start = false;
long t;
float min_read = 10000;
float max_read = -10000;
unsigned long time_now = 0;
unsigned long calibration_start_time = 0;
int calibration_period_in_s = 10;
float scaling_value = 255;
#define scl_dat 2
#define scl_pin 3
HX711_ADC LoadCell(scl_dat, scl_pin);
bool FLAG_debugging = true;

Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,
JOYSTICK_TYPE_MULTI_AXIS, 0, 0,
false, false, false, false, false, false,
false, false, true, true, false);

// Set to true to test “Auto Send” mode or false to test “Manual Send” mode.
const bool testAutoSendMode = false;

const unsigned long gcCycleDelta = 1000;
const unsigned long gcButtonDelta = 500;
const unsigned long gcAnalogDelta = 25;
unsigned long gNextTime = 0;
unsigned int gCurrentStep = 0;

#define EXTERNAL_EEPROM // if external EEPROM is used, uncommend this line to store range parameters in EEPROM
#if defined(EXTERNAL_EEPROM)
//#include <Wire.h>
#include <EEPROM.h>
unsigned char arr_lower_value[4];
unsigned char arr_higher_value[4];

/* These two functions help us write to the 24LC256 EEPROM chip */
#define EEPROM_ADDR 0x50
void EEPROM_write(unsigned int addr,byte data) {
int rdata = data;
// Wire.beginTransmission(EEPROM_ADDR);
// Wire.write((int)(addr >> 8)); // MSB
// Wire.write((int)(addr & 0xFF)); // LSB
// Wire.write(rdata);
// Wire.endTransmission();
EEPROM.write(addr, data & 0xff);
EEPROM.write(addr+1, data >> 8);

Serial.print("EEPROM write: addr: “);
Serial.print(addr);
Serial.print(” ");
Serial.println(data);
delay(5);
}

byte EEPROM_read(unsigned int addr) {
byte data = 0xFF;
// Wire.beginTransmission(EEPROM_ADDR);
// Wire.write((int)(addr >> 8)); // MSB
// Wire.write((int)(addr & 0xFF)); // LSB
// Wire.endTransmission();
// int n = Wire.requestFrom(EEPROM_ADDR,1);
// //Serial.print( "nmb of received bytes: " );
// //Serial.print( n );
// if (Wire.available())
// {
// data = Wire.read();
// //Serial.print(“wire available”);
// }
// else
// {
// Serial.print(“wire not available”);
// }

data = EEPROM.read(addr);

Serial.print("EEPROM read: addr: “);
Serial.print(addr);
Serial.print(” ");
Serial.println(data);

delay(5);
return data;
}

#endif

//void floatToByte(byte* arr, float value)
//{
// long l = (long) &value;
//
// arr[0] = l & 0x00FF;
// arr[1] = (l >> 8) & 0x00FF;
// arr[2] = (l >> 16) & 0x00FF;
// arr[3] = l >> 24;
//}

// convert a byte array to a float datatype
float byteToFloat(unsigned char* arr)
{
int i = arr[0] | (arr[1] << 8) | (arr[2] << 16) | (arr[3] << 24);
return (float) &i;
}

void setup() {
Serial.begin(250000);
LoadCell.begin();
long stabilisingtime = 0; // tare preciscion can be improved by adding a few seconds of stabilising time
LoadCell.start(stabilisingtime);
LoadCell.setCalFactor(696.0); // user set calibration factor (float)

Joystick.setAcceleratorRange(0, 260);
Joystick.setBrakeRange(0, scaling_value);

if (testAutoSendMode)
{
Joystick.begin();
}
else
{
Joystick.begin(false);
}

pinMode(A0, INPUT_PULLUP);
pinMode(13, OUTPUT);

#if defined(EXTERNAL_EEPROM)

//Wire.begin();

// for (int i = 0; i < 4; i++)
// {
// arr_lower_value*=EEPROM_read(i);*
// }
// min_read = byteToFloat( arr_lower_value );
// *
// for (int i = 0; i < 4; i++)
// {
// arr_higher_value=EEPROM_read(i+4);
_
// }_
// max_read = byteToFloat( arr_higher_value );
_
//_
// //max_read = 3000;
EEPROM.get( 0, max_read );
EEPROM.get( 8, min_read );*

* Serial.print( min_read );
_
Serial.print( " " );_
Serial.print( max_read );*

* #endif*

}
void loop() {
* // memory allocation*
* float i;*
* float ii;*
* float bandwidth;*

* // read value from loadcell*
* LoadCell.update();*
* i = LoadCell.getData();*
* // If user types in “calibrate”, start calibration routine for 10s*
* if (Serial.available() > 0) {*
* a= Serial.readString();// read the incoming data as string*
* Serial.print("Received String: ");*
* Serial.println(a);*
* if (a == “calibrate”)*
* {*
* calibration_start_time = millis();
calibration_routine_start = true;
_
Serial.println(“Start calibration routine for 10 s”);_
min_read = 10000;
max_read = -10000;
_
}_
_
}_
_
// read time*_
* time_now = millis();*

* // adjust scaling factors during the first 10 seconds*
//if (time_now < (calibration_period_in_s * 1000) )
* if ((calibration_routine_start == true) )
_
{_
_
// during calibration time, adjust range parameters*_
if (time_now < (calibration_start_time + calibration_period_in_s * 1000) )
* {*
* // toggle LED to indicate calibration routine*
* if ( (time_now % 1000) > 500)
_
{_
digitalWrite(LED_BUILTIN, HIGH);
_
}_
_
else*_
* {*
* digitalWrite(LED_BUILTIN, LOW);
_
}_
_
// adjust min & max range of loadcell value*_
* min_read = min(i, min_read);
max_read = max(i, max_read);
_
}_
_
else*_
* {*

* calibration_routine_start = false;
_
Serial.println(“Calibration routine finished”);_
_
// recalibrate range parameters to allow reaching the range limits*_
* bandwidth = max_read - min_read;
min_read += 0.01 * bandwidth;
max_read -= 0.01 * bandwidth;
_
// if external EEPROM is used, store range parameters in EEPROM*_
* #if defined(EXTERNAL_EEPROM)
byte arr_lower_value = (byte )&min_read;
byte arr_higher_value = (byte )&max_read;
_
Serial.print( "write in data: " );
_
Serial.print( min_read );

_
Serial.print( " " );_
Serial.print( max_read );
_
Serial.println( " " );_
_
// Write calibration data to EEPROM*_
* EEPROM.put(0, max_read);
EEPROM.put(8, min_read);
_
float f = 0.00f;_
_
float f2 = 0.00f;_
_
EEPROM.get( 0, f );_
_
EEPROM.get( 8, f2 );_
_
Serial.println( f );_
_
Serial.println( " " );_
_
Serial.println( f2 );*_

// for (int i = 0; i < 4; i++)
// {
// EEPROM_write(i,arr_lower_value*);
_// }
// for (int i = 0; i < 4; i++)
// {_
// EEPROM_write(4+i,arr_higher_value);
_// }
//
// // Read calibration data from EEPROM*

// for (int i = 0; i < 4; i++)
// {
// arr_lower_value*=EEPROM_read(i);*
// }
// float min_read = byteToFloat( arr_lower_value );
//
// for (int i = 0; i < 4; i++)

// {
// arr_higher_value*=EEPROM_read(i+4);*
// }
// float max_read = byteToFloat( arr_higher_value );
// Serial.print( "store out data: " );
// Serial.print( min_read );
// Serial.print( " " );
// Serial.print( max_read );
// Serial.println( " " );
* #endif*
* // finally, turn off LED indication light*_

* digitalWrite(LED_BUILTIN, LOW);*

* }*
* }*

* // scale the value*
ii = (i - min_read) / ( max_read - min_read ) * scaling_value;
* if (ii <= 0)*
* {*
* ii = 0;*
* }*
* if (ii >= scaling_value)
_ {_
ii = scaling_value;
_ }
// for debugging: write to serial monitor*

* if (FLAG_debugging == true)*
* {
Serial.print( i );
Serial.print("\t");_

Serial.print( max_read );
_ Serial.print("\t"); _
Serial.print( min_read );
_ Serial.print("\t");
Serial.print( ii );
Serial.println();*_

* delay(20);*
* }*

* // write value to joystick api*
* Joystick.setBrake( ii );*
* if (testAutoSendMode == false)*
* {*
* Joystick.sendState();*
* }*

}

Please put CODE tags (button </>) around your code so we don’t get annoyed by those 8) and post the entire error message

It should look like this

My code here

I have tried your sketch and I don’t get any compilation error. The only difficulty lies in the Joystick library : you must take the ‘Joystick’ folder from the ‘ArduinoJoystickLibrary-master’ folder in the archive and copy that ‘Joystick’ folder into your arduino/libraries folder.

Where did you find that Joystick library? It is supposed to work on an Arduino Micro?