Don't work meniu script Need hlep :)

using UnityEngine;
using System.Collections;

public class pausemenu : MonoBehaviour {

public GUISkin skin;
public bool paused = false;
private bool vedimas = true;

public Transform skriptas;

private bool A0 = false;
private bool A1 = false;
private bool A2 = false;
private bool A3 = false;

private string Resursas0;
private string Resursas1;
private string Resursas2;
private string Resursas3;
//—
public string Vardas;
private int c;
public GameObject Resursai;

void Update() {

if (vedimas) {
Time.timeScale = 0;
vedimass();
}
else
Time.timeScale = 1;

//Game time is paused
if (paused) {
Time.timeScale = 0;
}
//If you press ESC one more time game will start
else {
Time.timeScale = 1;
}
//If you press ESC 2 times game continue
if(Input.GetKeyDown(KeyCode.Escape)) {
paused = !paused;
}

}
void OnGUI() {
if (paused)
PauseMenu();
}
//If paused you see few meniu buttons
void PauseMenu() {
GUILayout.BeginArea(new Rect((Screen.width * 0.5f) - 30, (Screen.height * 0.5f) - 100, 200, 200));
if (GUILayout.Button (“Testi Zaidima”)) {
paused = !paused;
}
if(GUILayout.Button (“Pradeti Is Naujo”)) {
Application.LoadLevel(“main scene”);
}
if(GUILayout.Button (“Iseiti”)) {
Application.Quit();
}

GUILayout.EndArea();
}

void vedimass() {
GUILayout.BeginArea (new Rect (0, 0, Screen.width, Screen.height));

Vardas = GUILayout.TextField (Vardas, 20);

Resursai.GetComponent ().resursas [0] = int.Parse(Resursas0);
Resursas0 = GUILayout.TextField (Resursas0, 20);
var stringilgis0 = Resursas0.Length;
if(stringilgis0 > 0)
A0 = true;

Vardas = GUILayout.TextField (Vardas, 20);
Resursai.GetComponent ().resursas [1] = int.Parse(Resursas1);
Resursas1 = GUILayout.TextField (Resursas1, 20);
var stringilgis1 = Resursas1.Length;
if(stringilgis1 > 0)
A1 = true;

Vardas = GUILayout.TextField (Vardas, 20);
Resursai.GetComponent ().resursas [2] = int.Parse(Resursas2);
Resursas2 = GUILayout.TextField (Resursas2, 20);
var stringilgis2 = Resursas2.Length;
if(stringilgis2 > 0)
A2 = true;

Vardas = GUILayout.TextField (Vardas, 20);
Resursai.GetComponent ().resursas [3] = int.Parse(Resursas3);
Resursas3 = GUILayout.TextField (Resursas3, 20);
var stringilgis3 = Resursas3.Length;
if(stringilgis3 > 0)
A3 = true;

if(A0 A1 A2 A3)
if(GUILayout.Button(“Continue”, GUILayout.Width(Screen.width), GUILayout.Height(Screen.height * 0.5f)))
vedimas = false;

}
}

Two points.

  1. Use code tags. [co de] and [/co de] (without the spaces) around your code.

  2. Be more specific. We’re not your high school computer science teacher, nor your personal tutor; very rarely is someone going to read through an entire script and say, “Oh, here, this is your problem” if we have no idea what problem we’re looking for. This is worse if it’s in a language that most of the board doesn’t speak (that is, not in English).

So, what, exactly, “don’t work” about this script? What is it supposed to do? What does it fail to do?

Soeey for my mistakes, it was my first big problem about unity. When the main scene starts first i must to see a table where i can write my game resourses and the problem is i can’t see that table.

It looks like your problem is probably that you are trying to call “vedimass” from Update, when you should be calling it from OnGUI. GUI.* functions only work from within OnGUI.