[AJUDA] ERRO NA ORG
#1

TA DANDO UM ERRO NA MINHA ORG Q ESTOU TENTANDO CRIAR .
VE O Q TA DE ERRADO AI.


Код:
#include <a_samp>
#include <dini>

#if defined FILTERSCRIPT
#define Bope     0x000000FF

new VPMilitar[2];
new tmp[128]
enum Info
{
    Bope,
};

new PlayerInfo[MAX_PLAYERS][Info];

forward VerificarVeiculo(playerid);
public VerificarVeiculo(playerid)
{
    for(new c = 0; c <= 4; c++)
    {
        if(IsPlayerInVehicle(playerid, VBope[c]) && PlayerInfo[playerid][Bope] < 1)
        {
            SendClientMessage(playerid, 0x000000FF, "Vocк nгo й do Bope");
            RemovePlayerFromVehicle(playerid);
            return 1;
        }
    }
    return 1;
}

forward SalvarOrg(playeri);
public SalvarOrg(playerid)
{
    new arquivo[60], nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nome, sizeof(nome));
    format(arquivo, sizeof(arquivo), "Contas\%s.ini", nome);
    if(!dini_Exists(arquivo))
    {
        dini_Create(arquivo);
    }
    if(PlayerInfo[playerid][Bope] > 0) dini_IntSet(arquivo, "Bope", PlayerInfo[playerid][Bope]);
    }
    return 1;
}
#else
#endif

public OnGameModeInit()
{
	VBope[1] = CreateVehicle(596,1656.21496582,-1718.64465332,20.30437469,0.00000000, 40, 40, 999); //Veiculo numero 0
    VBope[2] = CreateVehicle(596,1665.98400879,-1719.47753906,20.30437469,0.00000000, 40, 40, 999); //Veiculo numero 1
	return 1;
}
   VBope AddStaticVehicleEx(596,1656.21496582,-1718.64465332,20.30437469,0.00000000,40,40,40); //vbope
   AddStaticVehicleEx(596,1665.98400879,-1719.47753906,20.30437469,0.00000000,40,40,40); //vbope

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmd, "/convidar", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        new PlayerB;
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x000000FF, "Uso correto: /convidar [id]");
        PlayerB = strval(tmp);
        if(!IsPlayerConnected(PlayerB)) return SendClientMessage(playerid, 0x000000FF, "Este jogador nгo estб conectado");
        if(PlayerInfo[playerid][Bope] >= 35)
        {
            PlayerInfo[PlayerB][Bope] = 1;
            SendClientMessage(PlayerB, 0x000000FF, "Vocк entrou no Bope");
            SetPlayerColor(PlayerB, 0x000000FF);
            return 1;
        }
        return 1;
    }
    if(strcmp(cmd, "/promover", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        new PlayerB, level;
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x000000FF, "Uso correto: /promover [id] [cargo]");
        PlayerB = strval(tmp);
        if(!IsPlayerConnected(PlayerB)) return SendClientMessage(playerid, 0x000000FF, "Este jogador nгo estб conectado");
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x000000FF, "Uso correto: /promover [id] [cargo]");
        level = strval(tmp);
        if(level < 1 || level > 6) return SendClientMessage(playerid, 0x000000FF, "O level deve ser maior que 0 e menor que 7");
        new string[128], promovedor[MAX_PLAYER_NAME];
        GetPlayerName(playerid, promovedor, sizeof(promovedor));
        if(PlayerInfo[playerid][Bope] >= 35)
        {
            if(PlayerInfo[PlayerB][Bope] < 35) return SendClientMessage(playerid, 0x000000FF, "Este jogador nгo й da sua org");
            PlayerInfo[PlayerB][Bope] = level;
            format(string, sizeof(string), "Vocк foi promovido a level %d por %s", level, promovedor););
            SendClientMessage(PlayerB, Branco, string);
            return 1;
        }
        if(strcmp(cmd, "/demitir", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        new PlayerB, string[128], demitidor[MAX_PLAYER_NAME];
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x000000FF, "Uso correto: /demitir [id]");
        PlayerB = strval(tmp);
        GetPlayerName(playerid, demitidor, sizeof(demitidor));
        if(!IsPlayerConnected(PlayerB)) return SendClientMessage(playerid, 0x000000FF, "Este jogador nгo estб conectado");
        if(PlayerInfo[playerid][Bope] >= 35)
        {
            if(PlayerInfo[PlayerB][Bope] < 1) return SendClientMessage(playerid, 0x000000FF, "Este jogador nгo й da sua organizaзгo");
            PlayerInfo[PlayerB][Bope] = 0;
            format(string, sizeof(string), "Vocк foi demitido por %s", demitidor);
            SendClientMessage(PlayerB, Branco, string);
            return 1;
        }
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(newstate == PLAYER_STATE_DRIVER) VerificarVeiculo(playerid);
	return 1;
}
OLHA O ERRO AI.
Код:
C:\Documents and Settings\mauricio\Desktop\servergta\gamemodes\BOPE.pwn(53) : error 017: undefined symbol "VBope"
C:\Documents and Settings\mauricio\Desktop\servergta\gamemodes\BOPE.pwn(53) : warning 215: expression has no effect
C:\Documents and Settings\mauricio\Desktop\servergta\gamemodes\BOPE.pwn(53) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\mauricio\Desktop\servergta\gamemodes\BOPE.pwn(53) : error 029: invalid expression, assumed zero
C:\Documents and Settings\mauricio\Desktop\servergta\gamemodes\BOPE.pwn(53) : 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
#2

pawn Код:
TA DANDO UM ERRO NA MINHA ORG Q ESTOU TENTANDO CRIAR .
VE O Q TA DE ERRADO AI.
Claro, chefe. ¬¬
Ninguem aqui й vidente. Acho.
Posta o problema.
Reply
#3

pawn Код:
#include <a_samp>
#include <dini>

#if defined FILTERSCRIPT
#define Bope     0x000000FF

new VBope[4];
new tmp[128]
enum Info
{
    Bope,
};

new PlayerInfo[MAX_PLAYERS][Info];

forward VerificarVeiculo(playerid);
public VerificarVeiculo(playerid)
{
    for(new c = 0; c <= 4; c++)
    {
        if(IsPlayerInVehicle(playerid, VBope[c]) && PlayerInfo[playerid][Bope] < 1)
        {
            SendClientMessage(playerid, 0x000000FF, "Vocк nгo й do Bope");
            RemovePlayerFromVehicle(playerid);
            return 1;
        }
    }
    return 1;
}

forward SalvarOrg(playeri);
public SalvarOrg(playerid)
{
    new arquivo[60], nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nome, sizeof(nome));
    format(arquivo, sizeof(arquivo), "Contas\%s.ini", nome);
    if(!dini_Exists(arquivo))
    {
        dini_Create(arquivo);
    }
    if(PlayerInfo[playerid][Bope] > 0) dini_IntSet(arquivo, "Bope", PlayerInfo[playerid][Bope]);
    }
    return 1;
}
#else
#endif

public OnGameModeInit()
{
    VBope[0] = CreateVehicle(596,1656.21496582,-1718.64465332,20.30437469,0.00000000, 40, 40, 999); //Veiculo numero 0
    VBope[1] = CreateVehicle(596,1665.98400879,-1719.47753906,20.30437469,0.00000000, 40, 40, 999); //Veiculo numero 1
    VBope[2] = AddStaticVehicleEx(596,1656.21496582,-1718.64465332,20.30437469,0.00000000,40,40,40); //vbope
    VBope[3] = AddStaticVehicleEx(596,1665.98400879,-1719.47753906,20.30437469,0.00000000,40,40,40); //vbope
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmd, "/convidar", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        new PlayerB;
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x000000FF, "Uso correto: /convidar [id]");
        PlayerB = strval(tmp);
        if(!IsPlayerConnected(PlayerB)) return SendClientMessage(playerid, 0x000000FF, "Este jogador nгo estб conectado");
        if(PlayerInfo[playerid][Bope] >= 35)
        {
            PlayerInfo[PlayerB][Bope] = 1;
            SendClientMessage(PlayerB, 0x000000FF, "Vocк entrou no Bope");
            SetPlayerColor(PlayerB, 0x000000FF);
            return 1;
        }
        return 1;
    }
    if(strcmp(cmd, "/promover", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        new PlayerB, level;
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x000000FF, "Uso correto: /promover [id] [cargo]");
        PlayerB = strval(tmp);
        if(!IsPlayerConnected(PlayerB)) return SendClientMessage(playerid, 0x000000FF, "Este jogador nгo estб conectado");
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x000000FF, "Uso correto: /promover [id] [cargo]");
        level = strval(tmp);
        if(level < 1 || level > 6) return SendClientMessage(playerid, 0x000000FF, "O level deve ser maior que 0 e menor que 7");
        new string[128], promovedor[MAX_PLAYER_NAME];
        GetPlayerName(playerid, promovedor, sizeof(promovedor));
        if(PlayerInfo[playerid][Bope] >= 35)
        {
            if(PlayerInfo[PlayerB][Bope] < 35) return SendClientMessage(playerid, 0x000000FF, "Este jogador nгo й da sua org");
            PlayerInfo[PlayerB][Bope] = level;
            format(string, sizeof(string), "Vocк foi promovido a level %d por %s", level, promovedor););
            SendClientMessage(PlayerB, Branco, string);
            return 1;
        }
        if(strcmp(cmd, "/demitir", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        new PlayerB, string[128], demitidor[MAX_PLAYER_NAME];
        if(!strlen(tmp)) return SendClientMessage(playerid, 0x000000FF, "Uso correto: /demitir [id]");
        PlayerB = strval(tmp);
        GetPlayerName(playerid, demitidor, sizeof(demitidor));
        if(!IsPlayerConnected(PlayerB)) return SendClientMessage(playerid, 0x000000FF, "Este jogador nгo estб conectado");
        if(PlayerInfo[playerid][Bope] >= 35)
        {
            if(PlayerInfo[PlayerB][Bope] < 1) return SendClientMessage(playerid, 0x000000FF, "Este jogador nгo й da sua organizaзгo");
            PlayerInfo[PlayerB][Bope] = 0;
            format(string, sizeof(string), "Vocк foi demitido por %s", demitidor);
            SendClientMessage(PlayerB, Branco, string);
            return 1;
        }
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(newstate == PLAYER_STATE_DRIVER) VerificarVeiculo(playerid);
    return 1;
}
Sinceramente nгo entendo.
Reply
#4

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
pawn Код:
TA DANDO UM ERRO NA MINHA ORG Q ESTOU TENTANDO CRIAR .
VE O Q TA DE ERRADO AI.
Claro, chefe. ¬¬
Ninguem aqui й vidente. Acho.
Posta o problema.
EU JA EDITEI E COLOQUEI OS ERROS
Reply
#5



Uma coisa q eu intendi foi q vc coloco ] em vez de ; mais aonde eu num sei
Reply
#6

se disser ql a linha 53 ajuda...
Reply
#7

pawn Код:
new VBope[5];
Reply
#8

AI VAI A LINHA 53 E EM SEGUIDA OS ERROS

Код:
	VBope[1] = CreateVehicle(596,1656.21496582,-1718.64465332,20.30437469,0.00000000, 40, 40, 999); //Veiculo Bope numero 0
Код:
C:\Documents and Settings\mauricio\Desktop\servergta\gamemodes\BOPE.pwn(53) : error 017: undefined symbol "VBope"
C:\Documents and Settings\mauricio\Desktop\servergta\gamemodes\BOPE.pwn(53) : warning 215: expression has no effect
C:\Documents and Settings\mauricio\Desktop\servergta\gamemodes\BOPE.pwn(53) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\mauricio\Desktop\servergta\gamemodes\BOPE.pwn(53) : error 029: invalid expression, assumed zero
C:\Documents and Settings\mauricio\Desktop\servergta\gamemodes\BOPE.pwn(53) : 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
#9

Eu jб postei essa porra lб encima e vocкs ainda ficam floodando? pqp.
Reply
#10

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
pawn Код:
TA DANDO UM ERRO NA MINHA ORG Q ESTOU TENTANDO CRIAR .
VE O Q TA DE ERRADO AI.
Claro, chefe. ¬¬
Ninguem aqui й vidente. Acho.
Posta o problema.
Quote:
Originally Posted by Shickcard
Посмотреть сообщение
Eu jб postei essa porra lб encima e vocкs ainda ficam floodando? pqp.
AINDA NUM DEU
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)