Aller au contenu
  • 0

Comment mettre 2 fonctions dans un skript


Question

3 réponses à cette question

Messages recommandés

  • 0
Posté(e)

function openMenu2(p: player):
   wait 2 ticks
   open chest with 1 rows named "Test" to {_p}
   wait 1 tick
   format slot 0 of player with dirt named "Test" to close then run [openMenu({_p})]

function openMenu(p: player):
   wait 2 ticks
   open chest with 1 rows named "Test" to {_p}
   wait 1 tick
   format slot 0 of player with stone named "Test" to close then run [openMenu2({_p})]

command /test:
   trigger:
       openMenu(player)

 

Ça met "The function openMenu(player) does not exist"

  • 0
Posté(e)

Car tu as oublie les %

 

function openMenu2(p: player):
   wait 2 ticks
   open chest with 1 rows named "Test" to {_p}
   wait 1 tick
   format slot 0 of player with dirt named "Test" to close then run [openMenu(%{_p}%)]

function openMenu(p: player):
   wait 2 ticks
   open chest with 1 rows named "Test" to {_p}
   wait 1 tick
   format slot 0 of player with stone named "Test" to close then run [openMenu2(%{_p}%)]

command /test:
   trigger:
       openMenu(%player%)

×
×
  • 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.