SA-MP Forums Archive
[Ayuda] Error al compilar - 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: [Ayuda] Error al compilar (/showthread.php?tid=360117)



[Ayuda] Error al compilar - VodKa' - 16.07.2012

Bueno, primero me presento. Soy Rodrigo, tengo 16 aсos, y ayer empeze a investigar sobre el Pawn en SA:MP. Se de Pawn pero basado en CS 1.6.

Bueno, como empeze aprendiendo Pawn en CS 1.6 con los menus, empeze haciendo un menu muy sencillo.

Es este:

PHP код:
#include <a_players(1)>
#include <a_samp>
public OnPlayerCommandText(playeridcmdtext[])
{
       if (
strcmp("/armour"cmdtexttrue10) == 0)
       {
               
SetPlayerArmour(playerid"100");
       }

Pero me tira este error:

Код HTML:
C:\Users\Rodrigo\Desktop\SCRIPTING\Untitled.pwn(8) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Uso Pawno para hacer scriptear.

Salu2.-


Respuesta: [Ayuda] Error al compilar - EduGTA - 16.07.2012

Lo correcto serнa:

pawn Код:
#include <a_samp>

public OnPlayerCommandText(playerid, cmdtext[])
{
       if (strcmp("/armour", cmdtext, true, 10) == 0)
       {
               SetPlayerArmour(playerid, 100);
       }
}
Ya que 100 es un nъmero, no un texto.


Respuesta: [Ayuda] Error al compilar - Lunnatiicz - 16.07.2012

pawn Код:
#include <a_samp>

public OnPlayerCommandText(playerid, cmdtext[])
{
       if (strcmp("/armour", cmdtext, true, 10) == 0)
       {
               SetPlayerArmour(playerid, 100);
               return 1;
       }
}



Re: [Ayuda] Error al compilar - VodKa' - 16.07.2012

Gracias ^^