LCDkeypad shield programming having problem with calling functions

I am coding for a lcdkeypad shield connected to a mega 2560
i am encountering a problem in coding, the problem is it doesnt continue to the displaymenu, where it should show the options.
only prints the clearprinttitle then goes to clearprintmenu
please help me i only have limited time. thank you very much.

PS sorry to the people below who i might have irritated because i was in a hurry to post right away. i already read the reminder thread. Thank you, for your replies. btw. im not an english person pardon my comprehension and replying skill.

 #include <LiquidCrystal.h>
#include <LCD1602KeyPad.h>
// Initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

//States for the menu.
int currentMenuItem = 0;
int lastState = 0;
int currentPlayModeItem = 0;
int currentPracticeModeItem = 0;
String lcd_display = "mainmenu";

void setup() {
 //Set the characters and column numbers.
 lcd.begin(16, 2);
 //Print default title.
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("UKULELE CHORDS");
 lcd.setCursor(0, 1);
 lcd.print("TRAINER");
 delay(1000);

}

void loop() {
 //Call the main menu.
 if (lcd_display.equals("mainmenu")) {
mainMenu();
 }
 if (lcd_display.equals("playmode")) {
mainPlayMode();

 if (lcd_display.equals("practicemode")) {
mainPracticeMode();
 }
 }
}

void mainMenu() 
 {
 clearMenuTitle();
 //State = 0 every loop cycle.
 int state = 0;
 //Refresh the button pressed.
 int x = analogRead (0);
 //Set the Row 0, Col 0 position.
 lcd.setCursor(0, 0);

 //Check analog values from LCD Keypad Shield
 if (x < 100) {
   //Right
 } else if (x < 200) {
   //Up
   state = 1;
 } else if (x < 400) {
   //Down
   state = 2;
 } else if (x < 600) {
   //Left
 } else if (x < 800) {
   //Select
   state = 3;
 }



 //If we are out of bounds on th menu then reset it.
 if (currentMenuItem < 0 || currentMenuItem > 2) {
   currentMenuItem = 0;
 }

 //If we have changed Index, saves re-draws.
 if (state != lastState) {
   if (state == 1) {
     //If Up
     currentMenuItem = currentMenuItem - 1;
     displayMenu(currentMenuItem);
   } else if (state == 2) {
     //If Down
     currentMenuItem = currentMenuItem + 1;
     displayMenu(currentMenuItem);
   } else if (state == 3) {
     //If Selected
     selectMenu(currentMenuItem);

   }
   //Save the last State to compare.
   lastState = state;
 }
 //Small delay
 delay(5);
}

void mainPlayMode() 
{
 clearPlayModeTitle();
 int state = 0;
 int x = analogRead (0);
 //Set the Row 0, Col 0 position.
 lcd.setCursor(0, 0);

 //Check analog values from LCD Keypad Shield
 if (x < 100) {
   //Right
 } else if (x < 200) {
   //Up
   state = 1;
 } else if (x < 400) {
   //Down
   state = 2;
 } else if (x < 600) {
   //Left
 } else if (x < 800) {
   //Select
   state = 3;
 }
 //If we are out of bounds on th menu then reset it.
 if (currentPlayModeItem < 0 || currentPlayModeItem > 2) {
   currentPlayModeItem = 0;
 }

 //If we have changed Index, saves re-draws.
 if (state != lastState) {
   if (state == 1) {
     //If Up
     currentPlayModeItem = currentPlayModeItem - 1;
     displayPlayMode(currentPlayModeItem);
   } else if (state == 2) {
     //If Down
     currentPlayModeItem = currentPlayModeItem + 1;
     displayPlayMode(currentPlayModeItem);
   } else if (state == 3) {
     //If Selected
     selectPlayMode(currentPlayModeItem);
   }
   //Save the last State to compare.
   lastState = state;
 }
 //Small delay
 delay(5);
}

void mainPracticeMode() 
{
 clearPracticeModeTitle();
 int state = 0;
 int x = analogRead (0);
 //Set the Row 0, Col 0 position.
 lcd.setCursor(0, 0);

 //Check analog values from LCD Keypad Shield
 if (x < 100) {
   //Right
 } else if (x < 200) {
   //Up
   state = 1;
 } else if (x < 400) {
   //Down
   state = 2;
 } else if (x < 600) {
   //Left
 } else if (x < 800) {
   //Select
   state = 3;
 }
 //If we are out of bounds on th menu then reset it.
 if (currentPracticeModeItem < 0 || currentPracticeModeItem > 3) {
   currentPracticeModeItem = 0;
 }

 //If we have changed Index, saves re-draws.
 if (state != lastState) {
   if (state == 1) {
     //If Up
     currentPracticeModeItem = currentPracticeModeItem - 1;
     displayPracticeMode(currentPracticeModeItem);
   } else if (state == 2) {
     //If Down
     currentPracticeModeItem = currentPracticeModeItem + 1;
     displayPracticeMode(currentPracticeModeItem);
   } else if (state == 3) {
     //If Selected
     selectPracticeMode(currentPracticeModeItem);
   }
   //Save the last State to compare.
   lastState = state;
 }
 //Small delay
 delay(5);
}

//Display Menu Option based on Index.
void displayMenu(int x) 
{
 switch (x) {

   case 1:
     lcd.clear();
     lcd.print ("-> Play Mode");
     break;
   case 2:
     lcd.clear();
     lcd.print ("-> Practice Mode");
     break;
 }
}

//Display Play Mode Option based on Index.
void displayPlayMode(int x) 
{
 switch (x) {

   case 1:
     lcd.clear();
     lcd.print ("-> Song 1");
     break;
   case 2:
     lcd.clear();
     lcd.print ("-> Song 2");
     break;

 }
}

//Display Menu Option based on Index.
void displayPracticeMode(int x) {
 switch (x) {

   case 1:
     lcd.clear();
     lcd.print ("-> MAjor Chords" );
     break;
   case 2:
     lcd.clear();
     lcd.print ("-> Minor Chords");
     break;
   case 3:
     lcd.clear();
     lcd.print ("-> Seventh Chords");
     break;
 }
}

//Print a basic header on Row 1.


void clearMenuTitle() 
{
 lcd.clear();
 lcd.print("Select Mode:");
 delay(1000);
}

void clearPlayModeTitle() 
{
 lcd.clear();
 lcd.print("Select Songs:");
 delay(1000);
}

void clearPracticeModeTitle() 
{
 lcd.clear();
 lcd.print("Select Chor Family:");
 delay(1000);
}


//Show the selection on Screen.
void selectMenu(int x) 
{
 switch (x) {
   case 1:
     lcd.clear();
     lcd.setCursor(0, 0);
     lcd.print ("Selected");
     lcd.setCursor(0, 1);
     lcd.print ("-> Play Mode");
     lcd_display = "playmode";
     //Call the function that belongs to Option 1
     break;
     
   case 2:
     lcd.clear();
     lcd.setCursor(0, 0);
     lcd.print ("Selected");
     lcd.setCursor(0, 1);
     lcd.print ("-> Practice Mode");
     lcd_display = "practicemode";
     //Call the function that belongs to Option 2
     break;
 }
}
void selectPlayMode(int x) 
{
 switch (x) {
   case 1:
     lcd.clear();
     lcd.setCursor(0, 0);
     lcd.print ("Selected");
     lcd.setCursor(0, 1);
     lcd.print ("-> Song 1");

     break;

   case 2:
     lcd.clear();
     lcd.setCursor(0, 0);
     lcd.print ("Selected");
     lcd.setCursor(0, 1);
     lcd.print ("-> Song 2");
     break;
 }
}


void selectPracticeMode(int x) 
{
 switch (x) {
   case 1:
     lcd.clear();
     lcd.setCursor(0, 0);
     lcd.print ("Selected");
     lcd.setCursor(0, 1);
     lcd.print ("-> Major Chords");
     lcd_display = "majorchords";
     //Call the function that belongs to Option 1

     break;
   case 2:
     lcd.clear();
     lcd.setCursor(0, 0);
     lcd.print ("Selected");
     lcd.setCursor(0, 1);
     lcd.print ("-> Minor Chords");
     lcd_display = "minorchords";
     //Call the function that belongs to Option 2

     break;

   case 3:
     lcd.clear();
     lcd.setCursor(0, 0);
     lcd.print ("Selected");
     lcd.setCursor(0, 1);
     lcd.print ("-> Seventh Chords");
     lcd_display = "seventhchords";
     //Call the function that belongs to Option 2

     break;

 }
}

Read the sticky at the top of the forum and post the code correctly before we finish your degree for you.

Put some Serial.print()s in to see the value of pertinent variables at decision points in the code. Are they what you expect at that point ?

mixographer:
Read the sticky at the top of the forum and post the code correctly before we finish your degree for you.

Really, if you can't read the stickies that say "Read this BEFORE posting here", you don't deserve help or to graduate.

im sorry.

Not good enough. Read "How to use this forum" and fix your post.

mixographer:
Read the sticky at the top of the forum and post the code correctly before we finish your degree for you.

jremington:
Not good enough. Read "How to use this forum" and fix your post.

PaulS:
Really, if you can't read the stickies that say "Read this BEFORE posting here", you don't deserve help or to graduate.

I already did, it is my nature to say sorry first. there you go. dont be harsh.

 int x = analogRead (0);

So, what did you read? Guessing games are for pre-schoolers.

You need to assign a value to state for EVERY range of values. You need a MUCH better name than state.

You should NOT be replicating the code to determine which switch was pressed. Create a function to determine which switch was pressed, and call that where you need to know.