- Home /
error CS1502 and error CS1503 What is this?
using UnityEngine;
using System.Collections;
public class Menu : MonoBehaviour {
public string obecneOkno = "";
Vector2 srodekEkranu;
string login;
string haslo;
void Start () {
srodekEkranu = new Vector2(Screen.width/2-100, Screen.height/2-15);
}
void Update(){
}
void onGUI(){
switch(obecneOkno){
case "login":
PokazOknoLogowania();
break;
case "MenuGlowne":
break;
case "lobby":
break;
}
}
void PokazOknoLogowania(){
login = GUI.TextField (new Rect(srodekEkranu.x, srodekEkranu.y-35, 200, 30),login, 20, "box");
haslo = GUI.PasswordField (new Rect(srodekEkranu.x, srodekEkranu.y, 200, 30),haslo, "*char", 20, "box");
if (GUI.Button (new Rect(srodekEkranu.x, srodekEkranu.y+70, 200, 30),"zaloguj")){
}
}
}
Comment
Answer by DoTA_KAMIKADzE · Jul 04, 2015 at 06:13 PM
Next time post the actual error, not just error code. Anyway, in line#35 change this:
"*char"
on this:
'*'
Resulted line should be:
haslo = GUI.PasswordField(new Rect(srodekEkranu.x, srodekEkranu.y, 200, 30), haslo, '*', 20, "box");
Your answer
Follow this Question
Related Questions
Gui label errors 5 Answers
ERROR CS0199, ERROR CS1502, ERROR1503 1 Answer
Asset Bundle export script 'Cannot convert' error 1 Answer
Error CS1525 calling OntriggerEnter 1 Answer
Whats wrong with my script? GUI C# 2 Answers