error in pawno
#1

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;

Reply
#2

-ґ-------------------------------------------------------------------------------------------------------
Reply
#3

Did you define zcommand?
Reply
#4

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

#define <sscaf2>

to #define <sscanf2>
Reply
#6

what I have so
Quote:

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

Reply
#7

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

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

to #define <sscanf2>
what I have so defined

Quote:

#include <sscanf2>

Reply
#9

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

Banear compile them. And post you error boards.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)