Problema con comandos de animaciones
#1

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.
Reply
#2

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

Saludos.
Reply
#3

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;
}
Reply
#4

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.
Reply
#5

Revisa las "{" "}"
Reply
#6

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.
Reply
#7

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

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.
Reply
#9

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.
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)