[Ajuda] 4 Errors .
#1

Quote:

C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(315) : error 017: undefined symbol "Afk"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(315) : warning 215: expression has no effect
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(315) : error 001: expected token: ";", but found "]"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(315) : error 029: invalid expression, assumed zero
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(315) : fatal error 107: too many error messages on one line

Linha :
pawn Код:
//
    if(IsPlayerConnected(i) && Afk[i])
Code completo :
pawn Код:
//
    if(strcmp(cmdtext, "/ausentes", true) == 0)
    {
    SendClientMessage(playerid,0x008000AA,"|______Jogadores Ausentes_______|");
    new count = 0;
    new saiu[120];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) && Afk[i])
    {
    GetPlayerName(i,string,24);
    format(saiu,sizeof(saiu),"Ausente: {EE1289}%s", string);
    SendClientMessage(playerid, 0x0088CAAA, saiu);
    count++;}}
    if(count == 0)
    {
    SendClientMessage(playerid, 0xFF0000AA, "Nenhum Jogador Ausente no Momento.");
    }
    return 1;
    }
Se quizer rep pede , se num quizer mermo assim eu do (:
Reply
#2

new Afk;
no topo do gamemode
Reply
#3

no seu GM n existe a variavel afk, ou cria ela e da funзгo pra ela ou:

pawn Код:
if(IsPlayerConnected(i))
Reply
#4

Quote:
Originally Posted by kikito
Посмотреть сообщение
new Afk;
no topo do gamemode
Quote:
Originally Posted by Pharrel
Посмотреть сообщение
no seu GM n existe a variavel afk, ou cria ela e da funзгo pra ela ou:

pawn Код:
if(IsPlayerConnected(i))
Ai Fiz uq o Kikito pediu , Ta agr deu isso :

Quote:

C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(317) : error 028: invalid subscript (not an array or too many subscripts): "Afk"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(317) : warning 215: expression has no effect
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(317) : error 001: expected token: ";", but found "]"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(317) : error 029: invalid expression, assumed zero
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(317) : fatal error 107: too many error messages on one line

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


4 Errors.

Com um warning de brind '-'

Merma linha
pawn Код:
//
    if(IsPlayerConnected(i) && Afk[i])
Reply
#5

vc tem q por
pawn Код:
new Afk[MAX_PLAYERS];
vc n deu utilidade pra variavel, ninguem vai aparecer afk na lista.
Reply
#6

Quote:
Originally Posted by Pharrel
Посмотреть сообщение
vc tem q por
pawn Код:
new Afk[MAX_PLAYERS];
vc n deu utilidade pra variavel, ninguem vai aparecer afk na lista.
Brigadгo ai (:
Reply
#7

Aproveitando para nгo criar outro Topic , alguem pod eme ajudar com esses :

Quote:

C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(27) : error 001: expected token: ";", but found "new"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(232) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(247) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(337) : error 035: argument type mismatch (argument 1)

Linha do erro :
pawn Код:
new iBuy1;
Code completo :
pawn Код:
//_____[Pickups]_____//
new iBuy1;
new iBuy2;
Linha do warning:
pawn Код:
new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
Code completo :
pawn Код:
SetTimerEx("timer", annoucment, false, "i", playerid);
    GivePlayerMoney(playerid, spawnmoney);
    new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s entrou no server.", pname);
    SendClientMessageToAll(COLOR_RED, string);
    return 1;
}
Linha do warning:
pawn Код:
new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
Code completo :
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    switch(reason)
    {
        case 0: format(string, sizeof(string), "%s Saiu do servidor por problemas com crash/coneзгo. ", pname);
        case 1: format(string, sizeof(string), "%s Saiu do servidor. ", pname);
        case 2: format(string, sizeof(string), "%s Foi Kikado ou Banido. ", pname);
    }
    SendClientMessageToAll(COLOR_RED, string);
    return 1;
}
Linha do erro:
pawn Код:
if(strcmp(cmd, "/afk", true) == 0)
Code completo :
pawn Код:
if(strcmp(cmd, "/afk", true) == 0)
        {
        if(Afk[playerid]==0)
        {
        Afk[playerid]=1;
        SetPlayerVirtualWorld(playerid, 1);
        SetCameraBehindPlayer(playerid);
        TogglePlayerControllable(playerid,0);
        TextDrawShowForPlayer(playerid,Ausente);
        TextDrawShowForPlayer(playerid,On);
        new Ausentes[200];
        GetPlayerName(playerid, Ausentes, 30);
        format(string, 256, "[BDF]%s Esta Ausente /afk", Ausentes);
        SendClientMessageToAll( 0x00FFFFAA, string);
        }else{
        SendClientMessage(playerid,0xF60000AA,"(ERRO) Vocк jб estб no modo AFK!");
        return 1;
        }
        return 1;
        }
Reply
#8

Testa assim:

Linha do warning:
pawn Код:
new pname[MAX_PLAYER_NAME], string[46];//22+24
Code completo :
pawn Код:
SetTimerEx("timer", annoucment, false, "i", playerid);
    GivePlayerMoney(playerid, spawnmoney);
    new pname[MAX_PLAYER_NAME], string[46];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "%s entrou no server.", pname);
    SendClientMessageToAll(COLOR_RED, string);
    return 1;
}
Linha do warning:
pawn Код:
new pname[MAX_PLAYER_NAME], string[63];//39+24
Code completo :
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new pname[MAX_PLAYER_NAME], string[63];
    GetPlayerName(playerid, pname, sizeof(pname));
    switch(reason)
    {
        case 0: format(string, sizeof(string), "%s Saiu do servidor por problemas com crash/coneзгo. ", pname);
        case 1: format(string, sizeof(string), "%s Saiu do servidor. ", pname);
        case 2: format(string, sizeof(string), "%s Foi Kikado ou Banido. ", pname);
    }
    SendClientMessageToAll(COLOR_RED, string);
    return 1;
}
Linha do erro:
pawn Код:
if(!strcmp(cmd, "/afk", true) == 0)
Code completo :
pawn Код:
if(!strcmp(cmd, "/afk", true) == 0)
        {
        if(Afk[playerid]==0)
        {
        Afk[playerid]=1;
        SetPlayerVirtualWorld(playerid, 1);
        SetCameraBehindPlayer(playerid);
        TogglePlayerControllable(playerid,0);
        TextDrawShowForPlayer(playerid,Ausente);
        TextDrawShowForPlayer(playerid,On);
        new Ausentes[200];
        GetPlayerName(playerid, Ausentes, 30);
        format(string, 256, "[BDF]%s Esta Ausente /afk", Ausentes);
        SendClientMessageToAll( 0x00FFFFAA, string);
        }else{
        SendClientMessage(playerid,0xF60000AA,"(ERRO) Vocк jб estб no modo AFK!");
        return 1;
        }
        return 1;
        }
Reply
#9

blue deu uma porrada de erros

Quote:

C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(24) : error 021: symbol already defined: "string"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(25) : error 021: symbol already defined: "pname"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(25) : error 021: symbol already defined: "string"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(231) : error 021: symbol already defined: "GivePlayerMoney"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(232) : error 021: symbol already defined: "pname"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(232) : error 021: symbol already defined: "string"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(236) : error 010: invalid function or declaration
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(247) : warning 219: local variable "pname" shadows a variable at a preceding level
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(247) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(337) : error 017: undefined symbol "cmd"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(555) : warning 203: symbol is never used: "pname"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(555) : warning 203: symbol is never used: "spawnmoney"

Reply
#10

Quote:
Originally Posted by Laercio
Посмотреть сообщение
blue deu uma porrada de erros
Quote:

C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(24) : error 021: symbol already defined: "string"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(25) : error 021: symbol already defined: "pname"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(25) : error 021: symbol already defined: "string"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(231) : error 021: symbol already defined: "GivePlayerMoney"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(232) : error 021: symbol already defined: "pname"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(232) : error 021: symbol already defined: "string"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(236) : error 010: invalid function or declaration
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(247) : warning 219: local variable "pname" shadows a variable at a preceding level
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(247) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(337) : error 017: undefined symbol "cmd"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(555) : warning 203: symbol is never used: "pname"
C:\Users\Laercio\Documents\Meus arquivos recebidos\ftn.pwn(555) : warning 203: symbol is never used: "spawnmoney"

Todos os erros dizendo "symbol is never used" Significa que essa array nunca foi usada.
Todos os erros dizendo "symbol already defined" Significa que vocк jб esta a usar essa array, entгo nгo necessita de fazer outra.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)