Infinite for loop in GUI update

I have a itemList, I want to display it in Label and show out when user click buttonM. so I created a variable call dis_M when buttonM clicked dis_M equal to true. Now it is able to display, but one frame can only displays up to 8 items. So, I created a for loop inside a variable l to keep track if l > 7 then I break out the loop. And I have a right left button so when user click left button then the item start from position 8 will be displayed accordingly. Currently what I did was inside display_Menu() method I will check if display_M is true or not, if true, I check if right button is click or left button is click else I called display_M(0); (Start from first item). When I run the game it can display item from 0 to 7, when i click right button the index keep on increasing and then an error message Argument out of range shown. It seems like something is keep looping.I comment all the statement inside display_M() and try print(“Hello”),and it goes into a infinite loop as it keep on printing out the Hello. I am beginner for C# and Unity, I not very sure where goes wrong, and is there any better way to display the item?

List<Item> itemList;
private int index;
void Start (){
	display = false;
	display_B = false;
	display_X = true;
	display_M = false;
	left = false;
	right = false;
	itemList = GetComponent<dbStartUpInitialization> ().loadItem ();

void onGUI(){

  GUI.BeginGroup (new Rect (70, 55, 662, 519));{
       dis_M = true;
       dis_B = true;
       dis_X = true;

      else if(left)

 GUI.EndGroup ();

void display_M(int ind){
    GUI.BeginGroup (new Rect (0, 0, 662, 519));{
       for (int i = ind; i < itemList.Count; i++) {
        if (l < 8) {
          GUI.Label (new Rect (x, y, 80, 20), itemList*.ItemName.ToString ());*

GUI.Label (new Rect (x, y + 20, 80, 20), itemList*.Descriptions.ToString ());*
… some variables to keep track x y axis to display the label.

I didn’t check the logic of flags dis_M, dis_B etc. but the comparison in the if seems to have a typo: you’re comparing a variable l (letter L) to 8, and there’s no l in the code. One of the ways to limit the items displayed to 8 is like shown below (only the if clause was modified):

       for (int i = ind; i < itemList.Count; i++) {
        if (i-ind < 8) {
          GUI.Label (new Rect (x, y, 80, 20), itemList*.ItemName.ToString ());*
 _GUI.Label (new Rect (x, y + 20, 80, 20), itemList*.Descriptions.ToString ());*_