Arduino Coin sorter/counter HELP

Whenever I run this program, it says scope not defined which I really don't understand how it works
It says displayAmountSerial(); not defined in scope. I tried putting outside the bracket, but the error was still showing up.

How do I proceed forward?

// Include Libraries
#include "Arduino.h"
#include "LiquidCrystal_PCF8574.h"

// Pin Definitions
#define IROBJAVOID_1_PIN_OUT 2
#define IROBJAVOID_2_PIN_OUT 3

#define LCD_ADDRESS 0x3F
//#define LCD_ADDRESS 0x27

#define LCD_ROWS 2
#define LCD_COLUMNS 16
#define SCROLL_DELAY 150
#define BACKLIGHT 255

LiquidCrystal_PCF8574 lcdI2C;

const int timeout = 10000; //define timeout of 10 sec
char menuOption = 0;
long time0;

const int pinIr50f = 3;
const int pinIr1d = 2;

int IRvalue50f = 0;
int IRvalue1d = 0;

const int pinIrStart = 3;
int pinMotor = 4;
int IRvalueStart = 0;

int coinCount = 0;
int MoneyWorth = 0;
String MessageToPrint = "p";

void coinDetected() {
coinCount ++;
digitalWrite(pinMotor, LOW);
}

char menu()
{

Serial.println(F("\nWhich component would you like to test?"));
Serial.println(F("(1) IR Obstacle Avoidance Sensor #1"));
Serial.println(F("(2) IR Obstacle Avoidance Sensor #2"));
Serial.println(F("(3) LCD Display Screen 16x2 I2C"));
Serial.println(F("(menu) send anything else or press on board reset button\n"));
while (!Serial.available());

while (Serial.available())
{
char c = Serial.read();
if (isAlphaNumeric(c))
{
if (c == '1')
Serial.println(F("Now Testing IR Obstacle Avoidance Sensor #1"));
else if (c == '2')
Serial.println(F("Now Testing IR Obstacle Avoidance Sensor #2"));
else if (c == '3')
Serial.println(F("Now Testing LCD Display Screen 16x2 I2C"));
else
{
Serial.println(F("illegal input!"));
return 0;
}
time0 = millis();
return c;
}
}
}
void setup()
{
Serial.begin(9600);
pinMode(pinIr50f, INPUT);
pinMode(pinIr1d, INPUT);
while (!Serial) ;
Serial.println("start");

pinMode(IROBJAVOID_1_PIN_OUT, INPUT);
pinMode(IROBJAVOID_2_PIN_OUT, INPUT);

displayAmountSerial();

lcdI2C.begin(LCD_COLUMNS, LCD_ROWS, LCD_ADDRESS, BACKLIGHT);
menuOption = menu();

}

void loop() {
IRvalue50f = digitalRead(pinIr50f);
IRvalue1d = digitalRead(pinIr1d);

if (IRvalue50f == 0)
{
Serial.println("It was a 50f coin that was detected");
coinDetected();
MoneyWorth = MoneyWorth + 50;
displayAmountSerial();
displayAmount();
delay(200);
}

if (IRvalue1d == 0) {
Serial.println("It was a 1d coin that was detected");
coinDetected();
MoneyWorth = MoneyWorth + 50;
displayAmountSerial();
displayAmount();
delay(200);
}

if (menuOption == '1') {
bool irObjAvoid_1Var = !digitalRead(IROBJAVOID_1_PIN_OUT);
Serial.print(F("ObjAvoid: ")); Serial.println(irObjAvoid_1Var);

}
else if (menuOption == '2') {
bool irObjAvoid_2Var = !digitalRead(IROBJAVOID_2_PIN_OUT);
Serial.print(F("ObjAvoid: ")); Serial.println(irObjAvoid_2Var);

}
else if (menuOption == '3') {
lcdI2C.clear();
lcdI2C.print(" Total amount ") // Print print String to LCD on first line
lcdI2C.selectLine(2); // Set cursor at the begining of line 2
lcdI2C.print(" Rocks! "); // Print print String to LCD on second line
delay(1000);

}

if (millis() - time0 > timeout)
{
menuOption = menu();
}

}

WELCOME !

may I invite you to read HOW TO USE THIS FORUM
it is a sticky post on every forum

#7 shows how to post code .

displayAmountSerial();

like setup() and void(),
displayAmountSerial(); is a call to a different section of your sketch, it is not a command like lcd.print(“hello world”)

you do not have the destination.

do you have tabs on your sketch ?

or, this is part of the library.
can you post a link to the library ?

also, if this is from an tutorial, post a link to that.

DeathCrimson:
Whenever I run compile this program, the compiler says scope not defined which I really don't understand how it works.

It DOESN'T work. The message "error: 'displayAmountSerial' was not declared in this scope" means that you are trying to call a function that has not been defined. The compiler stops there and does not upload your sketch.

DeathCrimson:
How do I proceed forward?

Define the undefined functions.