SA-MP Forums Archive
Problema con comandos de animaciones - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Problema con comandos de animaciones (/showthread.php?tid=474799)



Problema con comandos de animaciones - HunterCash97 - 09.11.2013

Hola, bueno.. soy yo, de nuevo.. (el mister problema), bueno.. tengo otro problema, lo que pasa es que me puse a agregar animaciones a mi gm, iba bien hasta que terminй una lista, y al compilar me tira unos errores, йstas son las lнneas que me afectan:

pawn Код:
if(strcmp(cmd, "/seсagang6", true) == 0)
  ApplyAnimation(playerid, "GHANDS", "gsign3LH", 4.0, 1, 0, 0, 0, 0);
  }
 
  if(strcmp(cmd, "/seсagang7", true) == 0)
  ApplyAnimation(playerid, "GHANDS", "gsign4", 4.0, 1, 0, 0, 0, 0);
  }
 
  if(strcmp(cmd, "/seсagang8", true) == 0)
  ApplyAnimation(playerid, "GHANDS", "gsign4LH", 4.0, 1, 0, 0, 0, 0);
  }
 
  if(strcmp(cmd, "/seсagang9", true) == 0)
  ApplyAnimation(playerid, "GHANDS", "gsign5", 4.0, 1, 0, 0, 0, 0);
  }
 
  if(strcmp(cmd, "/seсagang10'", true) == 0)
  ApplyAnimation(playerid, "GHANDS", "gsign5LH", 4.0, 1, 0, 0, 0, 0);
  }
 
  if(strcmp(cmd, "/deteneranim", true) == 0) {
  ClearAnimations(playerid);
  }

  return 1;
}
Y me tira los siguientes errores:

pawn Код:
D:\Archivos\Simon\Server samp\gamemodes\bare.pwn(135) : error 010: invalid function or declaration
D:\Archivos\Simon\Server samp\gamemodes\bare.pwn(139) : error 010: invalid function or declaration
D:\Archivos\Simon\Server samp\gamemodes\bare.pwn(143) : error 010: invalid function or declaration
D:\Archivos\Simon\Server samp\gamemodes\bare.pwn(147) : error 010: invalid function or declaration
D:\Archivos\Simon\Server samp\gamemodes\bare.pwn(151) : error 010: invalid function or declaration
D:\Archivos\Simon\Server samp\gamemodes\bare.pwn(155) : error 010: invalid function or declaration
D:\Archivos\Simon\Server samp\gamemodes\bare.pwn(159) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


7 Errors.
(QUIERO ACLARAR QUE LA LНNEA 135 A LA 159 SON LAS QUE PUSE ARRIBA, LA 159 ES EL RETURN 1, Y LA 139 ES EL "if(strcmp(cmd, "/seсagang6", true) == 0)").

BUENO, їSaben que ocurre? Es que a veces me tiraba esos errores, pero no sй como solucionar, los solucionaba antes cuando de repente me faltaba un ";" al final o el "( )" estaba mal puesto, pero ahora lo he revisado de pies a cabeza y deberнa de compilar bien.

Gracias, un saludo.


Respuesta: Problema con comandos de animaciones - Swedky - 09.11.2013

Te faltan los parбmetros, fнjate aquн: https://sampwiki.blast.hk/wiki/ApplyAnimation.

Saludos.



Respuesta: Problema con comandos de animaciones - AntonyFC - 09.11.2013

intentalo asi:
pawn Код:
if(strcmp(cmd, "/seсagang6", true) == 0){
  ApplyAnimation(playerid, "GHANDS", "gsign3LH", 4.0, 1, 0, 0, 0, 0);
   return 1;
 }
 
  if(strcmp(cmd, "/seсagang7", true) == 0){
  ApplyAnimation(playerid, "GHANDS", "gsign4", 4.0, 1, 0, 0, 0, 0);
   return 1;
 }
 
  if(strcmp(cmd, "/seсagang8", true) == 0){
  ApplyAnimation(playerid, "GHANDS", "gsign4LH", 4.0, 1, 0, 0, 0, 0);
   return 1;
 }
 
  if(strcmp(cmd, "/seсagang9", true) == 0){
  ApplyAnimation(playerid, "GHANDS", "gsign5", 4.0, 1, 0, 0, 0, 0);
  return 1;
}
 
  if(strcmp(cmd, "/seсagang10'", true) == 0){
  ApplyAnimation(playerid, "GHANDS", "gsign5LH", 4.0, 1, 0, 0, 0, 0);
    return 1;
}
 
  if(strcmp(cmd, "/deteneranim", true) == 0) {
  ClearAnimations(playerid);
    return 1;
}



Re: Respuesta: Problema con comandos de animaciones - HunterCash97 - 09.11.2013

Quote:
Originally Posted by EnzoMetlc
Посмотреть сообщение
Te faltan los parбmetros, fнjate aquн: https://sampwiki.blast.hk/wiki/ApplyAnimation.

Saludos.
Estos son mis otros comandos de mismo tipo y me andan de maravilla:

pawn Код:
if(strcmp(cmd, "/seсagang1", true) == 0) {
  ApplyAnimation(playerid, "GHANDS", "gsign1", 4.0, 1, 0, 0, 0, 0);
  }
 
  if(strcmp(cmd, "/seсagang2", true) == 0) {
  ApplyAnimation(playerid, "GHANDS", "gsign1LH", 4.0, 1, 0, 0, 0, 0);
  }
 
  if(strcmp(cmd, "/seсagang3", true) == 0) {
  ApplyAnimation(playerid, "GHANDS", "gsign2", 4.0, 1, 0, 0, 0, 0);
  }
 
  if(strcmp(cmd, "/seсagang4", true) == 0) {
  ApplyAnimation(playerid, "GHANDS", "gsign2LH", 4.0, 1, 0, 0, 0, 0);
  }
 
  if(strcmp(cmd, "/seсagang5", true) == 0)
  ApplyAnimation(playerid, "GHANDS", "gsign3", 4.0, 1, 0, 0, 0, 0);
  }
No creo que sean los parбmetros.


Re: Problema con comandos de animaciones - 0xFFFFFF - 09.11.2013

Revisa las "{" "}"


Re: Problema con comandos de animaciones - HunterCash97 - 09.11.2013

Quote:
Originally Posted by 0xFFFFFF
Посмотреть сообщение
Revisa las "{" "}"
Eso hago, pero a lo otro que uno me dijo que despuйs de cada comando ponga "return 1", no sirve.. me genera mas errores, ya lo probй y ademбs me di cuenta en seguida de que me tirarнa error.

GRACIAS! ME ACABO DE DAR CUENTA QUE LE FALTA EL "{" AL PRINCIPIO, SOLO PONНA EL "}", SE ME PASУ ESA, TE LO AGRADEZCO MEN..

SOLUCIONADO.


Respuesta: Problema con comandos de animaciones - AntonyFC - 09.11.2013

pon debajo de tus includes
pawn Код:
#pragma tabsize 0



Respuesta: Problema con comandos de animaciones - TheChaoz - 13.11.2013

Quote:
Originally Posted by AntonyFC
Посмотреть сообщение
pon debajo de tus includes
pawn Код:
#pragma tabsize 0
Esto es mala practica y no esta recomendado en lo mas minimo.


Respuesta: Problema con comandos de animaciones - OTACON - 13.11.2013

Quote:
Originally Posted by AntonyFC
Посмотреть сообщение
pon debajo de tus includes
pawn Код:
#pragma tabsize 0
https://sampforum.blast.hk/showthread.php?tid=114080

Quote:
Originally Posted by REGLAS
Codigo prohibido - Hay algunos '#pragma' que pueden ocultar advertencias y producir cуdigo ilegible. Si tu sabes

SA-MP esta tratando de ke no lo utilicen a eso man.

haciendo eso es ocmo ir a la escuela y copiarte y aprobar y no estaras aprendiendo, y ya ke aca estamos aprendiendo PAWN y si evitamos los errores asi no aprenderemos, y ke tambien evitando esos errores estaras haciendo mas errores futuros.

saludos.



Re: Respuesta: Problema con comandos de animaciones - 0xFFFFFF - 13.11.2013

Quote:
Originally Posted by OTACON
Посмотреть сообщение
https://sampforum.blast.hk/showthread.php?tid=114080



SA-MP esta tratando de ke no lo utilicen a eso man.

haciendo eso es ocmo ir a la escuela y copiarte y aprobar y no estaras aprendiendo, y ya ke aca estamos aprendiendo PAWN y si evitamos los errores asi no aprenderemos, y ke tambien evitando esos errores estaras haciendo mas errores futuros.

saludos.
Y la ortografia trata de que no existan post asi, es como ir a la escuela.

Saludos.