[Ajuda] Erros dificeis
#1

bom galera estou com esses erros insuportaveis nгo consigo resolver alguem experiente ajude-me ai ...

pawn Код:
(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 :
pawn Код:
stock AdvanceSpectate(playerid)
{
    if(ConnectedPlayers() == 2) { StopSpectate(playerid); return 1; }    // ERRO NESSA LINHA AQUIIII
    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;
}
Stock relacionadas

pawn Код:
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;
}
2
pawn Код:
stock ConnectedPlayers()
{
        new count;
        for(new x=0; x<MAX_PLAYERS; x++) {
            if(IsPlayerConnected(x)) {
                        count++;
                }
        }
        return count;
}
Reply
#2

Qual delas й a linha ?
Reply
#3

Coloque assim

pawn Код:
stock AdvanceSpectate(playerid)
{
    if(ConnectedPlayers() == 2) { StopSpectate(playerid);
    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;
}
Reply
#4

vlw cara
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)