- Home /
Question by
Unitedev2014 · Feb 08, 2014 at 08:16 PM ·
errorsystem
[Help] FormatException: Input string was not in the correct format System.Int32.Parse
In Spanish:
Hola , tengo un problema en unity , estoy intentando de diseñar un sistema de cuando se llegue a una cierta puntuación en un GUIText , se termine el juego :
In English:
Hi, I have a problem with unity, I'm trying to design a system when it reaches a certain score on a GUIText, the game over
This is my code / Este es mi codigo :
#pragma strict
var texto1 : GUIText ;
function Update () {
var puntos = int.Parse(texto1.text); // This is where I get error
if ( puntos >= 10 ){
texto1.pixelOffset.x = -50 ;
texto1.pixelOffset.y = 10 ;
texto1.text = "Gracias por Jugar .. !!" ;
texto1.fontSize = 30 ;
var limite_veces = 50 ;
var veces = 0 ;
veces = veces + 1 ;
if ( veces >= limite_veces ){
Application.LoadLevel ("nivel_01") ;
}
}
}
Comment
http://www.dotnetperls.com/int-parse
What text does texto1 have?
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Argument out of range. 1 Answer
I need some help with these errors. 1 Answer
inventory help 1 Answer
How to Fix Compilier Errors? 0 Answers