Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

[Help] FormatException: Input string was not in the correct format System.Int32.Parse

$
0
0
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") ; } } }

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>