SA-MP Forums Archive
error in pawno - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error in pawno (/showthread.php?tid=549579)



error in pawno - Lanzik - 07.12.2014

Hi I have these errors and not as well put it help me because estuveditando and do not know how to fix

Error:

PHP код:
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(9343) : error 029invalid expressionassumed zero
C
:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(9343) : error 017undefined symbol "c_banear"
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(9343) : error 029invalid expressionassumed zero
C
:\Users\Usuario\Desktop\NewParadise\gamemodes\NPRP.pwn(9343) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

online 9343:
PHP код:
CMD:banear(playerid,params[]) { 
several online:
PHP код:
CMD:banear(playerid,params[]) {
if (
EstadoDuty[playerid] == false)
if(
PI[playerid][Staff] == 2) {
if(!
sscanf(params,"d",params[0])) return Mensaje(playerid,COLOR_BLANCO,"Administrador usa /banear [ID o Player]");
Mensaje(params[0],COLOR_BLANCO,"Te han baneado.");
Ban(params[0]);
Mensaje(playerid,COLOR_BLANCO,"Lo has baneado.");
}
return 
1;




Re: error in pawno - Lanzik - 07.12.2014

-ґ-------------------------------------------------------------------------------------------------------


Re: error in pawno - Copfan5 - 07.12.2014

Did you define zcommand?


Re: error in pawno - JuanStone - 07.12.2014

pawn Код:
#define <zcmd>
#define <sscaf2>

command(banear, playerid, params[])
{
    if(EstaDuty[playerid] == false)
    {
        if(PI[playerid][Staff] == 2)
        {
            if(sscanf(params, "u", params[0])) return SendClientMessage(playerid, COLOR_BLANCO, "administrador usa /banear [playerid/nombre].");
            if(IsPlayerConnected(params[0])&& params[0] != INVALID_PLAYER_ID)
            {
                Mensaje(params[0], COLOR_BLANCO, "Te han baneado.");
                Mensaje(playerid, COLOR_BLANCO, "Lo has baneado.");
                Ban(params[0]);
            }
            else
            {
                SendClientMessage(playerid, -1, "Player no conectado.");
            }
        }
        else
        {
            SendClientMessage(playerid, -1, "No eres administrador nivel 2");
        }
    }
    else
    {
        SendClientMessage(playerid, -1, "Estas en duty.");
    }
    return true;
}



Re: error in pawno - Glossy42O - 07.12.2014

#define <sscaf2>

to #define <sscanf2>


Re: error in pawno - Lanzik - 08.12.2014

what I have so
Quote:

#include <a_samp>
#include <dini>
#include <sscanf2>
#include <a_cmd>
#include <progress>
#include <Streamer>
#include <mSelection>
#include <SII>




Re: error in pawno - Lanzik - 08.12.2014

Quote:
Originally Posted by JuanStone
Посмотреть сообщение
pawn Код:
#define <zcmd>
#define <sscaf2>

command(banear, playerid, params[])
{
    if(EstaDuty[playerid] == false)
    {
        if(PI[playerid][Staff] == 2)
        {
            if(sscanf(params, "u", params[0])) return SendClientMessage(playerid, COLOR_BLANCO, "administrador usa /banear [playerid/nombre].");
            if(IsPlayerConnected(params[0])&& params[0] != INVALID_PLAYER_ID)
            {
                Mensaje(params[0], COLOR_BLANCO, "Te han baneado.");
                Mensaje(playerid, COLOR_BLANCO, "Lo has baneado.");
                Ban(params[0]);
            }
            else
            {
                SendClientMessage(playerid, -1, "Player no conectado.");
            }
        }
        else
        {
            SendClientMessage(playerid, -1, "No eres administrador nivel 2");
        }
    }
    else
    {
        SendClientMessage(playerid, -1, "Estas en duty.");
    }
    return true;
}
I think I lack the defined zcmd because I put it and I get the same error

C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPR P.pwn(9314) : error 029: invalid expression, assumed zero
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPR P.pwn(9314) : error 017: undefined symbol "c_banear"
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPR P.pwn(9314) : error 029: invalid expression, assumed zero
C:\Users\Usuario\Desktop\NewParadise\gamemodes\NPR P.pwn(9314) : fatal error 107: too many error messages on one line

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


4 Errors.


Re: error in pawno - Lanzik - 08.12.2014

Quote:
Originally Posted by Stuun
Посмотреть сообщение
#define <sscaf2>

to #define <sscanf2>
what I have so defined

Quote:

#include <sscanf2>




Re: error in pawno - BroZeus - 08.12.2014

You dont need to do #define... stop confusing him

Just make sure you have latest zcmd version.. There is only one prob with the code and that is solved in code below -
pawn Код:
CMD:banear(playerid,params[])
{
new id;
if(EstadoDuty[playerid] == false)
if(PI[playerid][Staff] == 2)
{
if(!sscanf(params,"u",id)) return Mensaje(playerid,COLOR_BLANCO,"Administrador usa /banear [ID o Player]");
//in sscanf you should use 'u' for getting playerid to ban and store it in a variable..
Mensaje(id,COLOR_BLANCO,"Te han baneado.");
Ban(id);
Mensaje(playerid,COLOR_BLANCO,"Lo has baneado.");
}
return 1;
}



Re: error in pawno - Doller - 08.12.2014

Banear compile them. And post you error boards.