[Ajuda] Chamar stock em um comando
#1

Olб, estou tentando chamar a stock - SSS - em um certo comando, porйm da alguns erros:

pawn Код:
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3258) : error 017: undefined symbol "HighestID"
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3265) : warning 215: expression has no effect
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3265) : error 001: expected token: ";", but found ")"
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3265) : error 029: invalid expression, assumed zero
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3274) : warning 215: expression has no effect
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3274) : error 001: expected token: ";", but found ")"
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3274) : error 029: invalid expression, assumed zero
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3299) : error 017: undefined symbol "Player"
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3299) : warning 215: expression has no effect
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3299) : error 001: expected token: ";", but found "]"
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3299) : error 029: invalid expression, assumed zero
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3299) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


9 Errors.
Comando:

pawn Код:
CMD:sss(playerid, params[])
{
    #pragma unused params
    SSS(playerid);
    return 1;
}
Acredito que o erro seja no comando, pois, ao tirar o tal os erros somem e o gamemode й compilado..
Acho que nгo vгo precisar da linha dos erros, caso precise, avise que irei passar.
Reply
#2

Poste as linhas do erro para resolver outros problemas.

Pelo q eu estou vendo aki vc nao criou as variaveis.
pawn Код:
new HighestID;

new Player[MAX_PLAYERS][pInfo];
Reply
#3

Quote:
Originally Posted by @SwY
Посмотреть сообщение
Olб, estou tentando chamar a stock - SSS - em um certo comando, porйm da alguns erros:

pawn Код:
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3258) : error 017: undefined symbol "HighestID"
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3265) : warning 215: expression has no effect
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3265) : error 001: expected token: ";", but found ")"
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3265) : error 029: invalid expression, assumed zero
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3274) : warning 215: expression has no effect
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3274) : error 001: expected token: ";", but found ")"
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3274) : error 029: invalid expression, assumed zero
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3299) : error 017: undefined symbol "Player"
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3299) : warning 215: expression has no effect
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3299) : error 001: expected token: ";", but found "]"
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3299) : error 029: invalid expression, assumed zero
C:\Users\YaaN\Desktop\@ Peace - DM !\gamemodes\PDM.pwn(3299) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


9 Errors.
Comando:

pawn Код:
CMD:sss(playerid, params[])
{
    #pragma unused params
    SSS(playerid);
    return 1;
}
Acredito que o erro seja no comando, pois, ao tirar o tal os erros somem e o gamemode й compilado..
Acho que nгo vгo precisar da linha dos erros, caso precise, avise que irei passar.
ZCMD nгo precisa retirar os paramкtros, E penso eu que ZCMD o pawn reconhece como uma stock entгo mude o nome, exemplo:

pawn Код:
CMD:chamarstock(playerid)
{
    SSS(playerid);
    return 1;
}
Reply
#4

@Los, o erro continua..

Linha dos erros:
pawn Код:
for(new i=0;i<HighestID+1;i++) // Erro 1 ( Faz parte da stock )
                Info[i][Kills] > Info[killer][Kills]) // Erro 2, 3, 4( Faz parte da stock )
                Info[i][Deaths] > Info[noob][Deaths]) // Erro, 5, 6, 7 ( Faz parte da Stock )
Player[vicio][TimeOnline] = (GetDateAndTime() - Player[vicio][ConnectedTick]); // Linha dos ultimos erros. ( Tambem faz parte da stock )
Oque nгo intendo й que quando eu tiro o comando que chama a stock, o gamemode compila, quando eu coloco o comando ele dla esses erros.
Reply
#5

Posta a stock.
Reply
#6

pawn Код:
stock SSS(playerid)
{
    new killer = INVALID_PLAYER_ID;
    new noob = INVALID_PLAYER_ID;
//  new vicio = INVALID_PLAYER_ID;
    new chefao = INVALID_PLAYER_ID;
    new points[MAX_PLAYERS];
    new guerra = INVALID_PLAYER_ID;

    for(new i=0;i<HighestID+1;i++)
    {
        if(IsPlayerConnected(i))
        {
            if (killer == INVALID_PLAYER_ID || !IsPlayerConnected(killer)) killer = i;
            if (i != killer)
            {
                Info[i][Kills] > Info[killer][Kills])
                {
                    killer = i;
                }
            }

            if (noob == INVALID_PLAYER_ID || !IsPlayerConnected(noob)) noob = i;
            if (i != noob)
            {
                Info[i][Deaths] > Info[noob][Deaths])
                {
                    noob = i;
                }
            }
            /* if (vicio == INVALID_PLAYER_ID || !IsPlayerConnected(vicio)) vicio = i;
            if (i != vicio)
            {
                if(Player[i][ConnectedTick] < Player[vicio][ConnectedTick])
                {
                    vicio = i;
                }
            } */


            if (chefao == INVALID_PLAYER_ID || !IsPlayerConnected(chefao)) chefao = i;
            if (i != chefao)
            {
                if(GetPlayerMoney(i) > GetPlayerMoney(chefao))
                {
                    chefao = i;
                }
            }
        }
    }

    // Player[vicio][TimeOnline] = (GetDateAndTime() - Player[vicio][ConnectedTick]);
    new tempstring[128];
    format(tempstring, sizeof(tempstring), "[STATS] • Brasil @ Peace ! » DM. - Iniciado em %s ", StartDate);
    SendClientMessage(playerid, COLOR_COCONUT, tempstring);
    format(tempstring, sizeof(tempstring), "> Assassino: %s %d Vнtimas - Noob: %s %d Mortes",PlayerName(killer),Player[killer][Kills],PlayerName(noob),Player[noob][Deaths]);
    SendClientMessage(playerid, COLOR_TEXT1, tempstring);
    format(tempstring, sizeof(tempstring), "> Chefгo: %s %d propriedades - Magnata: %s $%d - Viciado: %s Tempo Online: %s",PlayerName(chefao),GetPlayerMoney(chefao)/*,PlayerName(vicio),Convert(Player[vicio][TimeOnline])*/);
    SendClientMessage(playerid, COLOR_TEXT1 , tempstring);
    return 1;
}
Reply
#7

Verifica se dб erro:

pawn Код:
stock SSS(playerid)
{
    new killer = INVALID_PLAYER_ID;
    new noob = INVALID_PLAYER_ID;
//  new vicio = INVALID_PLAYER_ID;
    new chefao = INVALID_PLAYER_ID;
    new points[MAX_PLAYERS];
    new guerra = INVALID_PLAYER_ID;

    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if (killer == INVALID_PLAYER_ID || !IsPlayerConnected(killer)) killer = i;
            if (i != killer)
            {
                if(Info[i][Kills] > Info[killer][Kills])
                {
                    killer = i;
                }
            }

            if (noob == INVALID_PLAYER_ID || !IsPlayerConnected(noob)) noob = i;
            if (i != noob)
            {
                if(Info[i][Deaths] > Info[noob][Deaths])
                {
                    noob = i;
                }
            }
            /* if (vicio == INVALID_PLAYER_ID || !IsPlayerConnected(vicio)) vicio = i;
            if (i != vicio)
            {
                if(Player[i][ConnectedTick] < Player[vicio][ConnectedTick])
                {
                    vicio = i;
                }
            } */


            if (chefao == INVALID_PLAYER_ID || !IsPlayerConnected(chefao)) chefao = i;
            if (i != chefao)
            {
                if(GetPlayerMoney(i) > GetPlayerMoney(chefao))
                {
                    chefao = i;
                }
            }
        }
    }
    new tempstring[128];
    format(tempstring, sizeof(tempstring), "[STATS] • Brasil @ Peace ! » DM. - Iniciado em %s ", StartDate);
    SendClientMessage(playerid, COLOR_COCONUT, tempstring);
    format(tempstring, sizeof(tempstring), "> Assassino: %s %d Vнtimas - Noob: %s %d Mortes",PlayerName(killer),Player[killer][Kills],PlayerName(noob),Player[noob][Deaths]);
    SendClientMessage(playerid, COLOR_TEXT1, tempstring);
    format(tempstring, sizeof(tempstring), "> Chefгo: %s %d propriedades.",PlayerName(chefao),GetPlayerMoney(chefao));
    SendClientMessage(playerid, COLOR_TEXT1 , tempstring);
    return 1;
}
Reply
#8

Que cуdigo й esse... wttttttttff
Reply
#9

Ele vai pegar as informaзхes do jogador, e manda um SCM no Chat.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)