- Home /
GUI Error: You are pushing more GUIClips than you are popping
My code was running perfectly well then I changed a few lines and this error appeared. I have read other issues surrounding this error and in all cases GUI was the issue (unsurprising since it is a GUI Error) but the code I added didn't involve any GUI at all. Thanks
void pickArguments() {
a = Random.Range(-5, 6);
b = Random.Range(-5, 6);
c = Random.Range(-5, 6);
d = Random.Range(3, 4);
if (choice == "Cubic") {
int differentiatedA = 3 * a;
int differentiatedB = 2 * b;
int differentiatedC = c;
float x1 = (-differentiatedB +
Mathf.Sqrt(Mathf.Pow(differentiatedB, 2) - 4 * differentiatedA * differentiatedC))
/ (2 * a);
float x2 = (-differentiatedB -
Mathf.Sqrt(Mathf.Pow(differentiatedB, 2) - 4 * differentiatedA * differentiatedC))
/ (2 * a);
if (x1 >= -10 && x1 <= 10 && x2 >= -10 && x2 <= 10) {
pickXValues();
}
else {
pickArguments();
}
}
else {
pickXValues();
}
}
^ This is the code I added before the error appeared.
In addition to that error I also get 2 nullreferenceexceptions which aren't even from one of my scripts. They're from
UnityEditor.ObjectListArea+LocalGroup.UpdateAssets () (at C:/buildslave/unity/build/Editor/Mono/ObjectListLocalGroup.cs:88)
Also I get this error:
ArgumentException: Getting control 2's position in a group with only 2 controls when doing Repaint
Thanks
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
NullreferenceException, BeginScrollView style change 3 Answers
Multiple Cars not working 1 Answer
[Roll-a-ball] Changing UI text (NRE) 0 Answers