j'ai un soucis avec les fichiers de configs yml. J'ai réussi à en créer un, a écrire dedans mais je n'arrive pas à récupérer les données du fichier. Ce qui nous intéresse donc est de récupérer les données du fichier (soit, ne pas avoir <none> ci-dessous). J'ai tester uniquement pour le /leave mais si ca ne fonctionne pas pur l'un, ca ne fonctionnera pas pour les autres.
Voici les données :
Screens :
Code :
on load:
if folder "plugins/matchamking" doesn't exists:
create folder "plugins/message"
send "&cLe dossier matchmaking a été créer." to console
if file "plugins/matchamking/config.yml" doesn't exists:
create file "plugins/matchmaking/config.yml"
send "&cLe fichier de config du skript matchmaking a été créer." to console
write file "Config matchmaking" to "plugins/matchmaking/config.yml"
add "/play" to yaml list "Matchmaking.Configuration.Default_Command" from "plugins/matchmaking/config.yml"
add "/leave" to yaml list "Matchmaking.Configuration.Leave_Command" from "plugins/matchmaking/config.yml"
add "Vous venez de quitter la list d'attente." to yaml list "Matchmaking.Configuration.Leave_message" from "plugins/matchmaking/config.yml"
add "Match trouvé !" to yaml list "Matchmaking.Configuration.Match_find_message" from "plugins/matchmaking/config.yml"
add "Recherche une arène de combat..." to yaml list "Matchmaking.Configuration.Search_arena_message" from "plugins/matchmaking/config.yml"
add "2" to yaml list "Matchmaking.Configuration.Number_of_maximum_player" from "plugins/matchmaking/config.yml"
add "Votre match est prêt." to yaml list "Matchmaking.Configuration.Match_ready_message" from "plugins/matchmaking/config.yml"
add "/help" to yaml list "Matchmaking.Configuration.Commande_1" from "plugins/matchmaking/config.yml"
add "/help" to yaml list "Matchmaking.Configuration.Commande_2" from "plugins/matchmaking/config.yml"
add "/help" to yaml list "Matchmaking.Configuration.Commande_3" from "plugins/matchmaking/config.yml"
add "Recherche un match normal..." to yaml list "Matchmaking.Files.Normal.Search_normal_game_message" from "plugins/matchmaking/config.yml"
add "Recherche un match classé..." to yaml list "Matchmaking.Files.Ranked.Search_ranked_game_message" from "plugins/matchmaking/config.yml"
set {cmdleave} to single value "Matchmaking.Configuration.Leave_Command" get of "plugins/matchmaking/config.yml"
set {command} to single value "Matchmaking.Configuration.Default_Command" get of "plugins/matchmaking/config.yml"
set {msgsearchranked} to single value "Matchmaking.Files.Ranked.Search_ranked_game_message" get of "plugins/matchmaking/config.yml"
set {msgsearchnormal} to single value "Matchmaking.Files.Normal.Search_normal_game_message" get of "plugins/matchmaking/config.yml"
set {msgleave} to single value "Matchmaking.Configuration.Leave_message" get of "plugins/matchmaking/config.yml"
set {matchfind} to single value "Matchmaking.Configuration.Match_find_message" get of "plugins/matchmaking/config.yml"
set {msgasearcharena} to single value "Matchmaking.Configuration.Search_arena_message" get of "plugins/matchmaking/config.yml"
set {nbrofmaxplayers} to single value "Matchmaking.Configuration.Number_of_maximum_player" get of "plugins/matchmaking/config.yml"
set {msgready} to single value "Matchmaking.Configuration.Match_ready_message" get of "plugins/matchmaking/config.yml"
set {commande1} to single value "Matchmaking.Configuration.Commande_1" get of "plugins/matchmaking/config.yml"
set {commande2} to single value "Matchmaking.Configuration.Commande_2" get of "plugins/matchmaking/config.yml"
set {commande3} to single value "Matchmaking.Configuration.Commande_3" get of "plugins/matchmaking/config.yml"
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.
Question
Olyno
Type de problème : Fichier de config yml
Problème : variable qui ne veut pas se set
Bonjour,
j'ai un soucis avec les fichiers de configs yml. J'ai réussi à en créer un, a écrire dedans mais je n'arrive pas à récupérer les données du fichier. Ce qui nous intéresse donc est de récupérer les données du fichier (soit, ne pas avoir <none> ci-dessous). J'ai tester uniquement pour le /leave mais si ca ne fonctionne pas pur l'un, ca ne fonctionnera pas pour les autres.
Voici les données :
Screens :
Code :
Espérant que quelqu'un puisse m'aider
4 réponses à cette question
Messages recommandés