GUI Error:You are pushing more GUIClips than you are popping But cant find the error

Hello Everyone im trying to make an Inventory and ive been watching a few tutorials but not for love nor money can i get it to work and if thats not bad enough it keeps pushing an error though:
Error: (GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced)
Heres the line of code Triggering the Error

statsScroll = GUI.BeginScrollView(new Rect(buttonX-10, buttonY+120, 315, 360), statsScroll, new Rect(buttonX+315, buttonY+120, 295, 350+(20*l)));
for(int x = 0; 0 < playerInv.playerInventory.Count; x++)
{
        l = x;
	if(GUI.Button(new Rect(buttonX, buttonY+120+(20 * x),200, 100),playerInv.playerInventory[x].itemName, textstyle))
	{
		Debug.Log(playerInv.playerInventory[x].itemName);
	}
	return;
					
}
GUI.EndScrollView();

Thanks In Advance

Joshua Creighton

You are return’ing before the scrollview can end.
so the GUI system opens a scrollview, and then doesn’t close it before the end of the loop.

The Same Error Occurs Even With out Reture; :confused:

Ok, you’ve got a bad loop declaration
int x = 0; 0 < playerInv.playerInventory.Count; x++
should probably be
int x = 0; x < playerInv.playerInventory.Count; x++

Didnt even notice the 0 < playerInv.blablabla so thanks for pointing that out but,
still with the return; it still returns the error and does not display the name(s), with no return; it shows no error and still nothing is shown

Fixed!