[AJUDA] Erros...
#1

Bom, o code estб com um Undefined Simbol, jб tentei criar vбrias stocks para tentar arruma-lo, porйm nгo consigo.

pawn Код:
public DominateGangZone(pid, gzid)
{
    if(PlayerGangZone(pid) == -1)
        return GangZoneStopFlashForAll(gzid);

    if(MyTIME[pid] == MAX_TIMEDOMINATE)
    {
        GameTextForPlayer(pid, "~y~Dominado]", 3000, 3);
        MyTIME[pid] = 0;
        GangZoneStopFlashForAll(gzid);
        GangZone[gzid][Cor] = GetPlayerColor(pid)   + LIGHTER_COLOR;
        GangZoneShowForAll(gzid,GetPlayerColor(pid) + LIGHTER_COLOR);
        format(GangZone[gzid][Dono], strlen(GetNick(pid)), GetNick(pid));// Linha 90
        return false;
    }
    new _st[100];
    format(_st, sizeof(_st),"Dominando a gangzone %s~n~(%d/%d)",GetGangZoneName(gzid), MyTIME[pid], MAX_TIMEDOMINATE);
    GameTextForPlayer(pid, _st, 1200, 3);
    GangZoneFlashForAll(gzid, GetPlayerColor(pid)   + LIGHTER_COLOR);
    SetTimerEx("DominateGangZone", 1000, false, "id", pid, gzid);
    return MyTIME[pid]++;
}
O Suyan, autor do cуdigo, me enviou uma stock, segundo ele arrumaria, mas os erros continuam:
pawn Код:
stock GetNick( p) { static a[24]; GetPlayerName(p, a, 24); return a; }
E eu tentei fazer isso (acho que da na merma, mas na hora nгo percebi)
pawn Код:
stock GetNick(playerid)
{
    GetPlayerName(playerid, a);
    return a;
}
Sу que ambos nгo resolvem o problema.

Erros:
Код:
Compilando as.pwn...
D:\Infernus Pawn Editor\include\s_zone.inc(90) : error 017: undefined symbol "GetNick"
D:\Infernus Pawn Editor\include\s_zone.inc(90) : warning 215: expression has no effect
D:\Infernus Pawn Editor\include\s_zone.inc(90) : error 001: expected token: ";", but found ")"
D:\Infernus Pawn Editor\include\s_zone.inc(90) : error 029: invalid expression, assumed zero
D:\Infernus Pawn Editor\include\s_zone.inc(90) : fatal error 107: too many error messages on one line

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


4 Errors.
Alguem pode me ajudar? =/
Reply
#2

pawn Код:
format(GangZone[gzid][Dono], strlen(GetNick(pid)), GetNick(pid));// Linha 90
Substitua esta linha por esta:

pawn Код:
GangZone[gzid][Dono] = strlen(GetNick(pid));
-----------
pawn Код:
stock GetNick(playerid)
{
    GetPlayerName(playerid, a);
    return a;
}
E essa stock, por esta:

pawn Код:
stock GetNick(playerid)
{
    new
        a[MAX_PLAYER_NAME];
    GetPlayerName(playerid, a);
    return a;
}
Reply
#3

@edit
Tinha uma stock e uma static, sу que eu n tinha visto a static...

Agora restam 2 erros:
D:\Infernus Pawn Editor\include\s_zone.inc(85) : error 017: undefined symbol "playerid"
D:\Infernus Pawn Editor\include\s_zone.inc(92) : error 035: argument type mismatch (argument 1)

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext,"/Gang", true))
    {
        if(getPlayerGangID(playerid) == -1)
            return ShowPlayerDialog(playerid, GANG_CRIAR, DIALOG_STYLE_LIST, "~ Gangui Зisten ~", "Criar Gang\nEntrar Gang", "Ok", "Cancelar");
           
        ShowPlayerDialog(playerid, GANG_INFO, DIALOG_STYLE_LIST, "~ Gangui Зisten ~","Convidar\nAlianзas\nTrocar Cor\nDeletar", "Go", "Cancelar");
        return true;
    }
   
    if(!strcmp(cmdtext,"/r", true))
    {
        pInfo[playerid][PlayerGang] = -1;
        return true;
    }
    return false;
}// Linha 85
pawn Код:
if(MyTIME[pid] == MAX_TIMEDOMINATE)
    {
        GameTextForPlayer(pid, "~y~Dominado]", 3000, 3);// Linha 85
        MyTIME[pid] = 0;
        GangZoneStopFlashForAll(gzid);
        GangZone[gzid][Cor] = GetPlayerColor(pid)   + LIGHTER_COLOR;
        GangZoneShowForAll(gzid,GetPlayerColor(pid) + LIGHTER_COLOR);
        format(GangZone[gzid][Dono], strlen(GetNick(pid)), GetNick(pid));
        return false;
    } // Linha 92
Reply
#4

Isto deve resolver o seu problema .


Troque no seu cуdigo, esta linha :


pawn Код:
format(GangZone[gzid][Dono], strlen(GetNick(pid)), GetNick(pid));// Linha 90
Por:

pawn Код:
strmid(GangZone[gzid][Dono], GetNick(pid), 0, strlen(GetNick(pid)), 128);


E coloque no Final do GM a seguinte funзгo :

pawn Код:
stock GetNick(playerid)
{
    new NickName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, NickName, MAX_PLAYER_NAME);
    return NickName;
}

Quote:
Originally Posted by dMagnus
Посмотреть сообщение
@edit
Tinha uma stock e uma static, sу que eu n tinha visto a static...

Agora restam 2 erros:
D:\Infernus Pawn Editor\include\s_zone.inc(85) : error 017: undefined symbol "playerid"
D:\Infernus Pawn Editor\include\s_zone.inc(92) : error 035: argument type mismatch (argument 1)
Essas as linhas sгo mesmo da include s_zone ?



Espero ter ajudado .
Reply
#5

Use o que o rjjj postou, atй eu tinha me esquecido dos parвmetros do GetPlayerName.

Provavelmente, o dele irб funcionar.
Reply
#6

pawn Код:
static stock GetNick(p)
{
    static a[24];
    GetPlayerName(p, a, 24);
    return a;
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)