Aller au contenu
  • 0

Problème de "number"


Question

Posté(e)

Bonjours

 

J'ai un petit soucis que je n'arrive pas a resoudre dans mon code, voici mon code:

 

command /keys <player> <number>:
   trigger:
       if arg 2 is not set:
           give %arg-2% of 399 named "<red>Nether Star" to the player
       else:
           give 399 named "<red>Nether Star" to the player

 

et voici les erreurs:

 

[17:21:41 ERROR]: 0.02 of nether star named "º4Nether Star" is not a number (test².sk, line 11: give %arg-2% of 399 named "<red>Nether Star" to the player')
[17:21:41 WARN]: Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '399' with e.g. 'nether star'. (test².sk, line 13: give 399 named "<red>Nether Star" to the player')
[17:21:41 INFO]: Loaded 2 scripts with a total of 2 triggers and 2 commands in 3.02 seconds
[17:21:41 INFO]: [skript] Encountered 1 error while reloading the config and all scripts!

 

Merci

7 réponses à cette question

Messages recommandés

  • 0
Posté(e)
Je te donne le début du code. :)

 

command /keys <player> [<number>]:
   trigger:
       if arg 2 is not set:
           give nether star named "&cNether Star" to the player

 

Je ne sais pas faire la partie number. :confused:

Merci mais pour la suite es ce que ceci pourrait être cohérent ?

else:
   give %number% of nether star named "&cNether Star" to the player

  • 0
Posté(e)
command /keys <player> [<number>]:
   trigger:
       if arg 2 is not set:
           give nether star named "&cNether Star" to the player
       else:
           give 5 nether star named "&cNether Star" to the player

 

Tu peux choisir le nombre que tu veux. J'ai trouvé que ça @Patetic. :D

Ouais mais j'aimeraos chosire le "5" avec le [<number>]

  • 0
Posté(e)

Si la version au-dessus marche pas :)

command /keys <player> [<number>]:
   trigger:
       if arg 2 is not set:
           give nether star named "&cNether Star" to the player
       else:
       	set {_number} to "%arg 2%"
       	give {_number} nether star named "&cNether Star" to the player

  • 0
Posté(e)
Ca ? :

command /keys <player>[<number = 1>]:
   trigger:
       give arg 2 nether star named "&cNether Star" to the player

Si la version au-dessus marche pas :)

command /keys <player> [<number>]:
   trigger:
       if arg 2 is not set:
           give nether star named "&cNether Star" to the player
       else:
       	set {_number} to "%arg 2%"
       	give {_number} nether star named "&cNether Star" to the player

Merci a toi ça marche impec :) Bonne soirée

 

A lock

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