[Ayuda] Error al compilar
#1

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

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

pawn Код:
#include <a_samp>

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

Gracias ^^
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)