Ir para conteúdo
  • 0

[Resolvido] [Resolvido] [ERROR] Alguem pode ajudar ai?


Pergunta

Postado

Olá está dando erro nisso alguem ai pode me ajudar?

 

 

 

 

 930ee9e9a6024d87bac671c80590518c.png

10 respostass a esta questão

Posts Recomendados

Postado

Fiz assim ó

 

 

        Player lutador2 = (Player)FightUtils.participantes.get(r.nextInt(FightUtils.participantes.size())); lutador1 = (Player)FightUtils.participantes.get(r.nextInt(FightUtils.participantes.size()))) {}

 

 

Só que deu erro no final ()))) {}

Player lutador2 = (Player)FightUtils.participantes.get(r.nextInt(FightUtils.participantes.size()));
lutador1 = (Player)FightUtils.participantes.get(r.nextInt(FightUtils.participantes.size()));

Tenta assim '-'

Postado

Então pq tu fez um loop? '-'

        for (Player lutador2 = (Player)FightUtils.participantes.get(r.nextInt(FightUtils.participantes.size())); lutador1 == lutador2; lutador1 = (Player).....

 

Será que é por causa do lutador1 == lutador2;?

Postado

        for (Player lutador2 = (Player)FightUtils.participantes.get(r.nextInt(FightUtils.participantes.size())); lutador1 == lutador2; lutador1 = (Player).....

 

Será que é por causa do lutador1 == lutador2;?

Pode ser.

Não deu pra ver pela print, mais tu fez um código muito confuso ai e.e

 

 

não entendi se foi uma pergunta irônica, mais ok '-'

Postado

Não resolveu ainda 

Player lutador2 = (Player)FightUtils.participantes.get(r.nextInt(FightUtils.participantes.size()));

Da pra tu fazer isso fora do for, ai tu pode tirar o lutador1 = lutador2 ...

Postado
Player lutador2 = (Player)FightUtils.participantes.get(r.nextInt(FightUtils.participantes.size()));

Da pra tu fazer isso fora do for, ai tu pode tirar o lutador1 = lutador2 ...

 

Fiz assim ó

 

 

        Player lutador2 = (Player)FightUtils.participantes.get(r.nextInt(FightUtils.participantes.size())); lutador1 = (Player)FightUtils.participantes.get(r.nextInt(FightUtils.participantes.size()))) {}

 

 

Só que deu erro no final ()))) {}

Postado

logo-forum.png




Sua dúvida foi marcada como [Resolvido] e movido à área de dúvidas resolvidas.


Atenciosamente,
Gamer's Board

logo-forum.png




Sua dúvida foi marcada como [Resolvido] e movido à área de dúvidas resolvidas.


Atenciosamente,
Gamer's Board
Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...