[Ajuda] Erros na sTock. - 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] Erros na sTock. (
/showthread.php?tid=450598)
Erros na sTock. -
shittt - 13.07.2013
Bom galerinha estou com os seguintes erros quem Poder me ajudar ai agradeзo ...
Errors :
Код:
(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;
}
Declaraзoes das funзхes :
Код:
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;
}
Re: Erros na sTock. -
shittt - 13.07.2013
@alguem vem ai e ajuda pf
Re: Erros na sTock. -
Dragonborn - 14.07.2013
pawn Код:
if(ConnectedPlayers() == 2) return StopSpectate(playerid)
Tente.
Re: Erros na sTock. -
feliphemort - 14.07.2013
pawn Код:
if(ConnectedPlayers() == 2) return StopSpectate(playerid);
Re: Erros na sTock. -
shittt - 14.07.2013
Nada ainda , mesmos errors ...
Re: Erros na sTock. -
Ley - 14.07.2013
Tenta...
PHP код:
if(ConnectedPlayers( == 2)) { StopSpectate(playerid); return 1; }
Ou...
PHP код:
if(ConnectedPlayers(x) == 2) { StopSpectate(playerid); return 1; }
Re: Erros na sTock. -
shittt - 14.07.2013
Botei
Код:
if(ConnectedPlayers(x) == 2) { StopSpectate(playerid); return 1; }
DEU 4 erros denovo
Botei
Код:
if(ConnectedPlayers( == 2)) { StopSpectate(playerid); return 1; }
apareceu os 4 mesmos errors e mais 2 novos ...
Re: Erros na sTock. -
Ley - 14.07.2013
Tente substituir...
PHP код:
if(ConnectedPlayers( == 2))
Por:
PHP код:
if(ConnectedPlayers[playerid] == true)
Se nгo resolver, espera alguйm com mais experiкncia para ajuda-lo.
Re: Erros na sTock. -
shittt - 14.07.2013
deu nao
@edit : isso e dificil de se resolver ':/
Re: Erros na sTock. -
shittt - 15.07.2013
@alguem ai pra ajudar ....