- Home /
Question by
franbat · Oct 04, 2015 at 09:24 PM ·
error messageerror-message
Error message "FormatException: Input string was not in the correct format System.Int32.Parse (System.String s)..."
if (GUI.Button (new Rect (Screen.width / 12.0f, Screen.height / 2.5f, 120, 40), "Volver")) {
Application.LoadLevel("Main");
}
The code also works but this error message appears and I don't know why...:Error message "FormatException: Input string was not in the correct format System.Int32.Parse (System.String s) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Int32.cs:629) Buy.Update () (at Assets/Scripts/Store/Buy.cs:39)"
(Buy is the name of the script which I've written this code)
Comment
The message says that the error is happening on line 39 of "Buy.cs", is that one of the lines that you've shown us?
To me it seems unlikely, because the error message says it's happening in Update(), but you can't use GUI functions like that in Update().
Your answer
![](https://koobas.hobune.stream/wayback/20220612040037im_/https://answers.unity.com/themes/thub/images/avi.jpg)