Cambiar de strcmp a zcmd errores ayuda
#1

Estoy empezando a cambiar de strcmp a zcmd y me sale algunos errores me ayudan
asi lo tenia
pawn Код:
if(strcmp(cmd, /armarse", true) == 0) {
      if(PlayerInfo[playerid][pFaccion] == 1){
     if(IsPlayerInRangeOfPoint(playerid,6.0,274.5042,119.2094,1004.6172)){
    GivePlayerWeapon(playerid, 24, 9977);
    GivePlayerWeapon(playerid, 3, 9977);
    GivePlayerWeapon(playerid, 27, 9977);
    GivePlayerWeapon(playerid, 31, 9977);
    GivePlayerWeapon(playerid, 29, 9977);
    SetPlayerArmour(playerid,100);
    }
 }
    return 1;
}
|-Asi lo puse-|
pawn Код:
CMD:armarse(playerid,params[])
      if(PlayerInfo[playerid][pFaccion] == 1){
     if(IsPlayerInRangeOfPoint(playerid,6.0,274.5042,119.2094,1004.6172)){
    GivePlayerWeapon(playerid, 24, 8888);
    GivePlayerWeapon(playerid, 3, 8888);
    GivePlayerWeapon(playerid, 27, 8888);
    GivePlayerWeapon(playerid, 31, 8888);
    GivePlayerWeapon(playerid, 29, 8888);
    SetPlayerArmour(playerid,100);
    }
 }
    return 1;
}
Cuando copilo no me sale los errores si no que me sale pawn compiler library dejo de funcionar
Reply
#2

pawn Код:
CMD:armarse(playerid,params[])
{ // Faltaba esta llave
    if(PlayerInfo[playerid][pFaccion] == 1)
    {
        if(IsPlayerInRangeOfPoint(playerid, 6.0, 274.5042, 119.2094, 1004.6172))
        {
            GivePlayerWeapon(playerid, 24, 8888);
            GivePlayerWeapon(playerid, 3, 8888);
            GivePlayerWeapon(playerid, 27, 8888);
            GivePlayerWeapon(playerid, 31, 8888);
            GivePlayerWeapon(playerid, 29, 8888);
            SetPlayerArmour(playerid,100);
        }
    }
    return 1;
}
Reply
#3

perfect pero ahora me paso esto
Quote:

C:\Users\Usuario\Desktop\Hispania Zerok\gamemodes\NZRP.pwn(1337) : error 029: invalid expression, assumed zero
C:\Users\Usuario\Desktop\Hispania Zerok\gamemodes\NZRP.pwn(1337) : error 017: undefined symbol "cmd_armarse"
C:\Users\Usuario\Desktop\Hispania Zerok\gamemodes\NZRP.pwn(1337) : error 029: invalid expression, assumed zero
C:\Users\Usuario\Desktop\Hispania Zerok\gamemodes\NZRP.pwn(1337) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Reply
#4

linea 1337:
Quote:

CMD:armarse(playerid,params[])

Reply
#5

#include <zcmd>
Reply
#6

el problema esque estoy usando strcmp y lo esoty cambiando a zcmd tiene algo que ver eso?
Reply
#7

tengo que borrar algo?
Reply
#8

Pon completamente inйrte (como comentario) con /* y */ todo el callback OnPlayerCommandText.
Reply
#9

aqui lo tienes todo el onplayercommandtext
Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128];
new idx;
cmd = strtok(cmdtext, idx);

if (strcmp("/kill", cmdtext, true) == 0)
{
SetPlayerHealth(playerid, 0);
return 1;
}

Reply
#10

Quote:
Originally Posted by Lanzik
Посмотреть сообщение
aqui lo tienes todo el onplayercommandtext
Bueno, anъlalo como te dije antes e intenta compilar.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)