[Ajuda] Erro de compilaзгo
#1

Erro:
Quote:

(5 : error 021: symbol already defined: "pAdmin"
(264) : error 028: invalid subscript (not an array or too many subscripts): "pAdmin"
(264) : warning 215: expression has no effect
(264) : error 001: expected token: ";", but found "]"
(264) : error 029: invalid expression, assumed zero
(264) : fatal error 107: too many error messages on one line

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


5 Errors.

Enum

Quote:

enum pAdmin
{

pAdminLevel,
pAdminAutorizado

}

enum PlayerData
{
pAdminLevel,
pAdminAutorizado,
pMoney,
pPosition,
pWeapons
};

new pAdmin[MAX_PLAYERS][PlayerData];

Comando
PHP код:
CMD:autorizar(playeridparams[])
{
    new 
userid;
    if( 
pAdmin[playerid] < )
    if(
sscanf(params"u"id))
        return 
SendSyntaxMessage(playerid,-1,"/autorizar [playerid]");
    
pAdmin[userid][pAdminAutorizado] = 1;
    return 
1;

Reply
#2

testa
pawn Код:
CMD:autorizar(playerid, params[])
{
    new userid;
    if( pAdmin[playerid] < 6 )
    {
        if(sscanf(params, "u", id))
        {
           return SendSyntaxMessage(playerid,-1,"/autorizar [playerid]");
        }
        pAdmin[userid][pAdminAutorizado] = 1;
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by Ender_
Посмотреть сообщение
testa
pawn Код:
CMD:autorizar(playerid, params[])
{
    new userid;
    if( pAdmin[playerid] < 6 )
    {
        if(sscanf(params, "u", id))
        {
           return SendSyntaxMessage(playerid,-1,"/autorizar [playerid]");
        }
        pAdmin[userid][pAdminAutorizado] = 1;
    }
    return 1;
}
Nгo alterou nadinha ._.
Reply
#4

Vocк criou uma enum pAdmin й depois uma var tambйm como pAdmin.
Delete a enum pAdmin e deixe somente a PlayerData
Teste desta maneira!
PHP код:

enum PlayerData
{
    
pAdminLevel,
    
pAdminAutorizado,
    
pMoney,
    
pPosition,
    
pWeapons
};
new 
pAdmin[MAX_PLAYERS][PlayerData]; 
CMD:autorizar(playeridparams[])
{
    new 
userid;
    if( 
pAdmin[playerid][pAdminLevel] < )
    if(
sscanf(params"u"id))
        return 
SendSyntaxMessage(playerid,-1,"/autorizar [playerid]");
    
pAdmin[userid][pAdminAutorizado] = 1;
    return 
1;

Reply
#5

Tudo errado

PHP код:
enum pAdmin // vocк nomeia uma enum de pAdmin e depois cria uma variavel de mesmo nome
{
pAdminLevel// o pAdminLevel e pAdminAutorizado jб estб na enum PlayerData O_O
pAdminAutorizado
}
enum PlayerData
{
pAdminLevel,
pAdminAutorizado,
pMoney,
pPosition,
pWeapons
};
new 
pAdmin[MAX_PLAYERS][PlayerData]; // ??? 
@EDIT

O Cara acima foi ninja, enquanto eu arrumava aqui ele jб te ajudou
Reply
#6

Eu atualizei o cуdigo, mas continua dando erro.

Enum
Quote:

enum pData
{
pAdminLevel,
pAdminAuthorized,
pMoney,
Float: pPosition,
pWeapons
};

new pAdmin[MAX_PLAYERS][pData];

Comando
Quote:

CMD:autorizar(playerid, params[])
{
new userid;

if( pData[playerid][pAdminLevel] < 6 )

if(sscanf(params, "u",*userid))
return*SendSyntaxMessage(playerid,-1,"/autorizar [playerid]");

pData[userid][pAdminAuthorized] = 1;

return*1;
}

Erros
Quote:

C:\Users\User\Documents\'-'\gamemodes\Undefined.pwn(252) : error 010: invalid function or declaration
C:\Users\User\Documents\'-'\gamemodes\Undefined.pwn(252) : error 001: expected token: ";", but found "-identifier-"
C:\Users\User\Documents\'-'\gamemodes\Undefined.pwn(256) : error 010: invalid function or declaration
C:\Users\User\Documents\'-'\gamemodes\Undefined.pwn(25 : error 010: invalid function or declaration
C:\Users\User\Documents\'-'\gamemodes\Undefined.pwn(261) : error 010: invalid function or declaration
C:\Users\User\Documents\'-'\gamemodes\Undefined.pwn(263) : error 010: invalid function or declaration
C:\Users\User\Documents\'-'\gamemodes\Undefined.pwn(265) : warning 203: symbol is never used: "pAdmin"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.

Reply
#7

Quote:
Originally Posted by MineiriinHo
Посмотреть сообщение
Eu atualizei o cуdigo, mas continua dando erro.

Enum


Comando


Erros
mano vocк estб usando errado

Olhe como estб o meu code e olhe o seu!

PHP код:
enum PlayerData
{
    
pAdminLevel,
    
pAdminAutorizado,
    
pMoney,
    
pPosition,
    
pWeapons
};
new 
pAdmin[MAX_PLAYERS][PlayerData]; 
CMD:autorizar(playeridparams[])
{
    new 
userid;
    if( 
pAdmin[playerid][pAdminLevel] < )
    if(
sscanf(params"u"id))
        return 
SendSyntaxMessage(playerid,-1,"/autorizar [playerid]");
    
pAdmin[userid][pAdminAutorizado] = 1;
    return 
1;

Reply
#8

REMOVIDO '-'
Reply
#9

@Removed '-'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)