Question by
JATON24hd · Sep 19, 2016 at 05:05 PM ·
script error
BCE0044: expecting EOF, found '}'. HEEEELP! AYUDAAAAA!
#pragma strict
//estado
var estado : int = 0;
//animaciones
var nada : AnimationClip;
var caminar : AnimationClip;
var correr: AnimationClip;
var morir : AnimationClip;
var atakar : AnimationClip;
// Valores
var pat : float= 0;
var patu : boolean= true;
function Start () {
}
function Update () {
}
if (pat < 0) {
patu = false;
}
if (pat > 10) {
patu = true;
}
if (patu == true) {
pat -= 1 *Time.deltaTime;
}
if (patu == false) {
pat += 1 *Time.deltaTime;
}
if (estado == 0) {//nada
Nada ();
}
if (estado == 1) {//patrullar
Patrullar ();
}
if (estado == 2) {//persegir
Perseguir ();
}
if (estado == 3) {//atacar
Atakar ();
}
if (estado == 4) {//Morir
Morir ();
}
if (estado == 5) {//Esquivar
Esquivar ();
}
}
function Nada () {
GetComponent.().play (nada.name);
}
function Patrullar () {
GetComponent.().play (caminar.name);
}
function Perseguir () {
GetComponent.().play (correr.name);
}
function Atakar () {
GetComponent.().play (atakar.name);
}
function Morir () {
GetComponent.().play (morir.name);
}
function Esquivar () {
GetComponent.().play (caminando.name);
}
Comment
Answer by Landern · Sep 19, 2016 at 05:06 PM
Line 19, remove the closing curly brace which is closing the code block which you just open for the Update function.
Your answer
![](https://koobas.hobune.stream/wayback/20220612093040im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
NullReferenceException, Script Error 1 Answer
how can i resolve this script inventary 1 Answer
How do I fix this error? 0 Answers
how do you correct errors in a script? 0 Answers
Scripts works on PC, not android. 0 Answers