Skocz do zawartości
  • 0

Problem z odczytem pliku YAML.


Vikepljunior

Pytanie

Witam. jak w teamcie. odrazu mowie ze wszystko zostalo zrobione zgodnie z poradnikiem. jest 0 bledy.

Kod:

variables:
	{mysql_f::friends::%player%} = 0
	
on script load:
	if file "plugins/SzymexFriends/config.yml" doesn't exists:
		wf "SzymexFriends Config" to "plugins/SzymexFriends/config.yml"
		wf "" to "plugins/SzymexFriends/config.yml"
		wf "lang: pl" to "plugins/SzymexFriends/config.yml"
		wf "" to "plugins/SzymexFriends/config.yml"
		wf "prefix: &d&lFRIENDS &e&l⋙" to "plugins/SzymexFriends/config.yml"
		wf "reload: &bSkript reload!" to "plugins/SzymexFriends/config.yml"
		wf "maxfriends: 100" to "plugins/SzymexFriends/config.yml"
		wf "numbers or 'unlimited'" to "plugins/SzymexFriends/config.yml"
		wf "command-msg: false" to "plugins/SzymexFriends/config.yml"
		wf "Required" to "plugins/SzymexFriends/config.yml"
		wf "RankPlaceholer: none" to "plugins/SzymexFriends/config.yml"
		wf "" to "plugins/SzymexFriends/config.yml"
		wf "Otherpapi-on-friend: false" to "plugins/SzymexFriends/config.yml"
		wf "OtherPlaceholder: none" to "plugins/SzymexFriends/config.yml"
		wf "player-color: &7" to "plugins/SzymexFriends/config.yml"
		wf "data-color: &7" to "plugins/SzymexFriends/config.yml"
		wf "" to "plugins/SzymexFriends/config.yml"		
	if file "plugins/SzymexFriends/message_pl.yml" doesn't exists:	
		wf "SzymexFriends Message Config" to "plugins/SzymexFriends/message_pl.yml"
		wf "" to "plugins/SzymexFriends/message_pl.yml"
		wf "bar: &5-------------------------------------------------------------------" to "plugins/SzymexFriends/message_pl.yml"
		wf "join: &7{player} &aDolaczyl" to "plugins/SzymexFriends/message_pl.yml"
		wf "quit: &7{player} &cWyszedl!" to "plugins/SzymexFriends/message_pl.yml"
		wf "invite-a: &eZaprosiles gracza {invite}! Gracz ma 60s na zaakceptowanie zaproszenia" to "plugins/SzymexFriends/message_pl.yml"
		wf "invite-b: &eOtrzymales zaproszenie od {inviter}. Klinij &a&l[AKCEPTUJ] &eaby zaakceptowac zaproszenie." to "plugins/SzymexFriends/message_pl.yml"
		wf "accept-a: &a&l[AKCEPTUJ]" to "plugins/SzymexFriends/message_pl.yml"
		wf "disaccept-a: &c&l[ODRZUC]" to "plugins/SzymexFriends/message_pl.yml"
		wf "accept-msg-a: &eGracz {invite} zaakceptowal twoje zaproszenie do zanjomych!" to "plugins/SzymexFriends/message_pl.yml"
		wf "accept-msg-b: &ezaakceptowales zaproszenie do znajomych od {inviter}" to "plugins/SzymexFriends/message_pl.yml"
		wf "disaccept-msg-a: &eGracz {invite} odrzucil twoje zaproszenie do grona znajomych." to "plugins/SzymexFriends/message_pl.yml"
		wf "disaccept-msg-b: &eOdrzuciles zaproszenie od gracza {inviter}." to "plugins/SzymexFriends/message_pl.yml"
		wf "delete-a: &eUsunoles gracza {delete} z grona znajomych." to "plugins/SzymexFriends/message_pl.yml"
		wf "delete-b: &eGracz {deleter} usunol cie z grona znajomych." to "plugins/SzymexFriends/message_pl.yml"
		wf "timeout-a: &aZaproszenie do gracza {invite} wygaslo!" to "plugins/SzymexFriends/message_pl.yml"
		wf "timeout-b: &aZaproszenie od gracza {inviter} wygaslo!" to "plugins/SzymexFriends/message_pl.yml"
		wf "foundfriend: &eTen gracz jest juz twoim znajomym." to "plugins/SzymexFriends/message_pl.yml"
		wf "FrienList: &aLista Twoich znajomych:" to "plugins/SzymexFriends/message_pl.yml"
		wf "nonefriend: &cNie masz zmajomych!" to "plugins/SzymexFriends/message_pl.yml"
		wf "status-online: &a&l[ONLINE]" to "plugins/SzymexFriends/message_pl.yml"
		wf "status-offline: &c&l[OFFLINE]" to "plugins/SzymexFriends/message_pl.yml"
		wf "" to "plugins/SzymexFriends/message_pl.yml"
	if file "plugins/SzymexFriends/message_en.yml" doesn't exists:	
		wf "SzymexFriends Message Config" to "plugins/SzymexFriends/message_en.yml"
		wf "" to "plugins/SzymexFriends/message_en.yml"
		wf "bar: &5-------------------------------------------------------------------" to "plugins/SzymexFriends/message_en.yml"
		wf "join: &7{player} &aJoined!" to "plugins/SzymexFriends/message_en.yml"
		wf "quit: &7{player} &cleft!" to "plugins/SzymexFriends/message_en.yml"
		wf "invite-a: &eZaprosiles of {invite}! The player has 60s to accept the invitation" to "plugins/SzymexFriends/message_en.yml"
		wf "invite-b: &eYou received an invitation from {inviter}. Klinij &a&l[ACCEPT] &eto accept the invitation." to "plugins/SzymexFriends/message_en.yml"
		wf "accept-a: &a&l[ACCEPT]" to "plugins/SzymexFriends/message_en.yml"
		wf "disaccept-a: &c&l[DISCARD]" to "plugins/SzymexFriends/message_en.yml"
		wf "accept-msg-a: &ePlayer {invite} accept your invitation to friends!" to "plugins/SzymexFriends/message_en.yml"
		wf "accept-msg-b: &eyou accepted the friend request from {inviter}" to "plugins/SzymexFriends/message_en.yml"
		wf "disaccept-msg-a: &ePlayer {invite} declined your friend request." to "plugins/SzymexFriends/message_en.yml"
		wf "disaccept-msg-b: &eYou have rejected an invitation from {inviter}." to "plugins/SzymexFriends/message_en.yml"
		wf "delete-a: &eRemove {delete} from your friends group." to "plugins/SzymexFriends/message_en.yml"
		wf "delete-b: &ePlayer {deleter} remove you from the group of friends." to "plugins/SzymexFriends/message_en.yml"
		wf "timeout-a: &aThe invite to {invite} has expired!" to "plugins/SzymexFriends/message_en.yml"
		wf "timeout-b: &aThe invitation from {inviter} has expired!" to "plugins/SzymexFriends/message_en.yml"
		wf "foundfriend: &eThis player is already your friend." to "plugins/SzymexFriends/message_en.yml"
		wf "FrienList: &aYour friends list:" to "plugins/SzymexFriends/message_en.yml"
		wf "nonefriend: &cYou don't have friends!" to "plugins/SzymexFriends/message_en.yml"
		wf "status-online: &a&l[ONLINE]" to "plugins/SzymexFriends/message_en.yml"
		wf "status-offline: &c&l[OFFLINE]" to "plugins/SzymexFriends/message_en.yml"
		wf "" to "plugins/SzymexFriends/message_en.yml"
	set {reload} to yaml value "lang" from file "plugins/SzymexFriends/config.yml"
	send "%yaml value ""prefix"" from file ""plugins/SzymexFriends/config.yml""% %{reload}%" to all ops	
	set {lang} to single value "lang" get of "plugins/SzymexFriends/config.yml"
	stop

	
on login:
	if {lang} is "pl":
		send "%yaml value ""prefix"" from file ""plugins/SzymexFriends/config.yml""% %yaml value ""join"" from file ""plugins/SzymexFriends/message_pl.yml""%" to {mysql_f::list::%player%}
		stop
	if {lang} is "en":
		send "%yaml value ""prefix"" from file ""plugins/SzymexFriends/config.yml""% %yaml value ""join"" from file ""plugins/SzymexFriends/message_en.yml""%" to {mysql_f::list::%player%}
		stop
	send "&cDoesn't Language!" to player
	stop

on quit:
	if {lang} is "pl":
		send "%yaml value ""prefix"" from file ""plugins/SzymexFriends/config.yml""% %yaml value ""quit"" from file ""plugins/SzymexFriends/message_pl.yml""%" to {mysql_f::list::%player%}
		stop
	if {lang} is "en":
		send "%yaml value ""prefix"" from file ""plugins/SzymexFriends/config.yml""% %yaml value ""quit"" from file ""plugins/SzymexFriends/message_en.yml""%" to {mysql_f::list::%player%}
		stop
	send "&cDoesn't Language!" to player
	stop	
	
command /f [<text>] [<offlineplayer]:
	aliases: friends, znajomi ,z
	trigger:
		if {lang} is "pl":
			if arg 1 is not set:
				send "%yaml value ""bar"" from file ""plugins/SzymexFriends/message_pl.yml""%"
				send ""
				send " &7/f add (player)"
				send " &7/f delete (player)"
				send " &7/f list (player)"
				send " &7/f accept (player)"
				send " &7/f decline (player)"
				send "" 
				send "%yaml value ""bar"" from file ""plugins/SzymexFriends/message_pl.yml""%"		
		
	
			

Prosze o niekomentowanie.

Odnośnik do komentarza
Udostępnij na innych stronach

2 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...