Aller au contenu
  • 0

problème de loop


Question

Posté(e)

Bonjour,

 

je suis en train d'écrire un petit jeu mais j'ai un erreur que je ne comprend pas :/

J'ai l'erreur suivante: "there's no loop that matches 'loop player title...

Je ne comprend pas car ca me dit qu'il manque un loop alors qu'il y en a un...

 

Merci d'avance Apelli

 

 

on join:
   clear player's inventory
   if {game.start} is true:
       kick player due to "la partie a déja commenée"

   if {game.start} is false:
       add 1 to {wait.nbr.joueur}
       set join message to "{@logo} %player% nous a rejoint pour nous afronter (%{wait.nbr.joueur}%/8"
       teleport player to {wait.spawn}
       wait 1 second
       if {wait.nbr.joueur} >= 4:
           set {game.counter} to true
           set {timer} to 30
           if {game.counter} is true:   
               while {game.counter} is true:
                   loop all players:           
                       send "{@logo}&4La partie commence dans %{timer}% secondes" to loop-player
                       add -1 to {timer}
                       wait 1 second                        
                       if {timer} = 0:
                           set {game.counter} to false
                           set {game.start} to true
                           make console execute command "/es start"
                           send loop-player title "&6La partie commence" and subtitle "&2Bonne chance" for 2 seconds
                       if {timer} = 4:
                           send loop-player title "&44" for 1 second to loop-player 
                       if {timer} = 3:
                           send title "&43" for 1 second to loop-player
                       if {timer} = 2:
                           send title "&42" for 1 second to loop-player
                       if {timer} = 1:
                           send title "&41" for 1 second to loop-player

5 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Voilà:

on join:
   clear player's inventory
   if {game.start} is true:
       kick player due to "la partie a déja commenée"
   if {game.start} is false:
       add 1 to {wait.nbr.joueur}
       set join message to "{@logo} %player% nous a rejoint pour nous afronter (%{wait.nbr.joueur}%/8"
       teleport player to {wait.spawn}
       wait 1 second
       if {wait.nbr.joueur} >= 4:
           set {timer} to 30
           loop {timer} time:
               loop all players:    
                       send "{@logo}&4La partie commence dans %{timer}% secondes" to loop-player
                       add -1 to {timer}                
                       if {timer} = 0:
                           set {game.start} to true
                           make console execute command "/es start"
                           send loop-player title "&6La partie commence" and subtitle "&2Bonne chance" for 2 seconds
                       if {timer} = 4:
                           send loop-player title "&44" for 1 second to loop-player
                       if {timer} = 3:
                           send title "&43" for 1 second to loop-player
                       if {timer} = 2:
                           send title "&42" for 1 second to loop-player
                       if {timer} = 1:
                           send title "&41" for 1 second to loop-player
           wait 1 second

 

Dis si ça marche!

 

Un j'aime fait toujours plaisir ;)
×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.