- Home /
Question by
diogo70210 · Jun 18, 2015 at 10:28 AM ·
javascripterroroptimization
Error : BCE0024
I am very new to scripting nad need help. Erro: Assets/Scripts/GameMaster.js(6,22): BCE0024: The type 'UnityEngine.Rect' does not have a visible constructor that matches the argument list '(float, int)'.
#pragma strict
static var currentScore : int = 0;
function OnGUI () {
GUI.Box (new Rect (Screen.height*0.5, Screen.width/2), 200, 200, "score");
}
Please tell me exactly what I should do and what I should type!
Comment
Answer by DoTA_KAMIKADzE · Jun 18, 2015 at 10:29 AM
Your line #6 to this:
GUI.Box(new Rect(parseFloat(Screen.height) * 0.5f, parseFloat(Screen.width) / 2f, 200f, 200f), "score");
Your answer
Follow this Question
Related Questions
Cannot remove sprite using destroy 1 Answer
"';' expected. Insert a semicolon in the end" error 2 Answers
[CLOSED] UnityScript - enum to numeric value error 1 Answer
BCE0044 expecting ), found 'script' and BCE0043 unexpected token ) 2 Answers
WebGL build is getting cached in the browser, users cannot see updates... 0 Answers