SA-MP Forums Archive
[Ajuda] Erro com forward - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Erro com forward (/showthread.php?tid=450541)



Erro com forward - shittt - 13.07.2013

Bom tenho esse erro nao sei bem como resolver :

Код:
error 010: invalid function or declaration
Eu acho que tem haver que essa funзгo nao existe '-'


Linha aqui

Код:
forward OnDefaultParseFile(extraid, value [], key [], tag [], file []);



Re: Erro com forward - WLSF - 13.07.2013

tenta mudar o nome dos parвmetros e/ou das funзхes.

Aqui deu certinho, o erro й nessa linha mesmo ? oque tem por perto ?


Re: Erro com forward - shittt - 13.07.2013

tem isso


Код:
forward OnDefaultParseFile(extraid, value [], key [], tag [], file []);
public OnDefaultParseFile(extraid, value [], key [], tag [], file [])
{
 //	return printf("OnDefaultParseFile(%d, %s, %s, %s, %s)", extraid, value, key, tag, file);
	return 1;
}



Re: Erro com forward - WLSF - 13.07.2013

Funcionou trocar os nomes?

Nгo vi erro nisso.


Re: Erro com forward - shittt - 13.07.2013

Po fera tu e foda ,mais tem uns erro que nao postei pode ajudar tambem ...

Erros:
Код:
(15390) : error 012: invalid function call, not a valid address
(15390) : error 029: invalid expression, assumed zero
(15390) : warning 215: expression has no effect
(15390) : error 001: expected token: ";", but found ")"
(15390) : fatal error 107: too many error messages on one line
Linha :


Код:
stock AdvanceSpectate(playerid)
{
    if(ConnectedPlayers() == 2) { StopSpectate(playerid); return 1; }    // erro aqui
	if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && Player[playerid][gSpectateID] != INVALID_PLAYER_ID) {
            for(new x=Player[playerid][gSpectateID]+1; x<=MAX_PLAYERS; x++) {
                if(x == MAX_PLAYERS) { x = 0; }
                if(IsPlayerConnected(x) && x != playerid) {
                                if(GetPlayerState(x) == PLAYER_STATE_SPECTATING && Player[x][gSpectateID] != INVALID_PLAYER_ID ||
                                        (GetPlayerState(x) != 1 && GetPlayerState(x) != 2 && GetPlayerState(x) != 3))
                                {
                                        continue;
                                }
                                else {
                                        StartSpectate(playerid, x);
                                        break;
                                }
                        }
                }
        }
 	return 1;
}
@EDIT > Alguem pra ajudar


Re: Erro com forward - WLSF - 13.07.2013

Eu jб vi algo assim, sу nгo lembro onde e nem como, pode me mandar as declaraзхes das funзхes que estгo em uso nas linhas de erro ?

Код:
ConnectedPlayers()
StopSpectate(playerid)



Re: Erro com forward - shittt - 13.07.2013

Esta ai a stop spectate ea outra

Код:
stock StopSpectate(playerid)
{
	Player[playerid][ReloadPlayer] = true;
    TogglePlayerSpectating(playerid, 0);
   	Player[playerid][gSpectateID] = INVALID_PLAYER_ID;
   	Player[playerid][gSpectateType] = ADMIN_SPEC_TYPE_NONE;
    GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~r~Spectate Desligado",1000,3);
    return 1;
}
Код:
stock ConnectedPlayers()
{
        new count;
        for(new x=0; x<MAX_PLAYERS; x++) {
            if(IsPlayerConnected(x)) {
                        count++;
                }
        }
        return count;
}