Çözüldü Skript Hata

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Mashe

Farkında değilsin beni sen değiştirdin.
Destek Şefi
MinePass
Premium
Hosting Görevlisi
Katılım
7 Şubat 2023
Mesajlar
563
Elmaslar
205
Puan
5.680
Konum
Alaska, United States
Minecraft
Mashe1337

Discord:

mashe1337

Bir sistem yapmaya çalışıyorum. config.yml dosyasındaki ban=false kısmını kontrol etmesini istiyorum. Yani false ve true kısımlarını kontrol edip bir değişkene atayacağım. Sadece kontrol işlemi şu an yeterli olacaktır.

Kod:

Kod:
on load:
        else if file "plugins/Deneme/config.yml" does not exist:
            create file "plugins/Deneme/config.yml"
            write "ban-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 2) to file "plugins/Deneme/config.yml"
            write "commands-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "deaths-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "dropitem-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "getitem-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "mute-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "warn-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "worldchange-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            wait 0.2 seconds

command /deneme:
    trigger:
        set {_file} to "plugins/Deneme/config.yml"
        if {_file} exists:
            set {_contents} to "plugins/Deneme/config.yml"
            if "{_contents}" contains "ban-logs=true":
                broadcast "ban-logs=true bulundu!"
            else:
                broadcast "ban-logs=true bulunamadı!"
        else:
            broadcast "Dosya bulunamadı!"

Hata:

Kod:
Herhangi bir hata bulunmuyor fakat kontrol sağlanmıyor.
 
Bir sistem yapmaya çalışıyorum. config.yml dosyasındaki ban=false kısmını kontrol etmesini istiyorum. Yani false ve true kısımlarını kontrol edip bir değişkene atayacağım. Sadece kontrol işlemi şu an yeterli olacaktır.
Kodunuzu inceledim ve config.yml dosyasındaki ban=false kısmını kontrol etmek için birkaç değişiklik yapmanız gerektiğini gördüm. Şu şekilde yapabilirsiniz:
Kod:
on load:
        else if file "plugins/Deneme/config.yml" does not exist:
            create file "plugins/Deneme/config.yml"
            write "ban-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 2) to file "plugins/Deneme/config.yml"
            write "commands-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "deaths-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "dropitem-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "getitem-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "mute-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "warn-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "worldchange-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            wait 0.2 seconds

command /deneme:
    trigger:
        set {_file} to "plugins/Deneme/config.yml"
        if {_file} exists:
            # config.yml dosyasını yml olarak oku
            load yaml file {_file} as {_config}
            # ban-logs değerini bir değişkene ata
            set {_ban} to value "ban-logs" from {_config}
            # ban-logs değerini kontrol et
            if {_ban} is true:
                broadcast "ban-logs=true bulundu!"
            else if {_ban} is false:
                broadcast "ban-logs=false bulundu!"
            else:
                broadcast "ban-logs değeri geçersiz!"
        else:
            broadcast "Dosya bulunamadı!"
Umarım bu kod size yardımcı olur. Başka bir sorunuz varsa, yazabilirsiniz.
 
Kodunuzu inceledim ve config.yml dosyasındaki ban=false kısmını kontrol etmek için birkaç değişiklik yapmanız gerektiğini gördüm. Şu şekilde yapabilirsiniz:
Kod:
on load:
        else if file "plugins/Deneme/config.yml" does not exist:
            create file "plugins/Deneme/config.yml"
            write "ban-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 2) to file "plugins/Deneme/config.yml"
            write "commands-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "deaths-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "dropitem-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "getitem-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "mute-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "warn-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            write "worldchange-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
            wait 0.2 seconds

command /deneme:
    trigger:
        set {_file} to "plugins/Deneme/config.yml"
        if {_file} exists:
            # config.yml dosyasını yml olarak oku
            load yaml file {_file} as {_config}
            # ban-logs değerini bir değişkene ata
            set {_ban} to value "ban-logs" from {_config}
            # ban-logs değerini kontrol et
            if {_ban} is true:
                broadcast "ban-logs=true bulundu!"
            else if {_ban} is false:
                broadcast "ban-logs=false bulundu!"
            else:
                broadcast "ban-logs değeri geçersiz!"
        else:
            broadcast "Dosya bulunamadı!"
Umarım bu kod size yardımcı olur. Başka bir sorunuz varsa, yazabilirsiniz.
Kodda çok fazla gereksiz değişken oluyor. {_file} {_config} kısımlarını kaldırabilir miyiz?
 
Kodda çok fazla gereksiz değişken oluyor. {_file} {_config} kısımlarını kaldırabilir miyiz?
Buyrun henüz test etmedim siz test edip deneyebilirsiniz.

Kod:
on load:
    else if file "plugins/Deneme/config.yml" does not exist:
        create file "plugins/Deneme/config.yml"
        write "ban-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 2) to file "plugins/Deneme/config.yml"
        write "commands-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
        write "deaths-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
        write "dropitem-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
        write "getitem-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
        write "mute-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
        write "warn-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
        write "worldchange-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
        wait 0.2 seconds

command /deneme:
    trigger:
        if file "plugins/Deneme/config.yml" exists:
            load yaml file "plugins/Deneme/config.yml" as config
            set {_ban} to value "ban-logs" from config
            if {_ban} is true:
                broadcast "ban-logs=true bulundu!"
            else if {_ban} is false:
                broadcast "ban-logs=false bulundu!"
            else:
                broadcast "ban-logs değeri geçersiz!"
        else:
            broadcast "Dosya bulunamadı!"
 
Buyrun henüz test etmedim siz test edip deneyebilirsiniz.

Kod:
on load:
    else if file "plugins/Deneme/config.yml" does not exist:
        create file "plugins/Deneme/config.yml"
        write "ban-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 2) to file "plugins/Deneme/config.yml"
        write "commands-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
        write "deaths-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
        write "dropitem-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
        write "getitem-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
        write "mute-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
        write "warn-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
        write "worldchange-logs=true" at line (file "plugins/Deneme/config.yml"'s line count + 1) to file "plugins/Deneme/config.yml"
        wait 0.2 seconds

command /deneme:
    trigger:
        if file "plugins/Deneme/config.yml" exists:
            load yaml file "plugins/Deneme/config.yml" as config
            set {_ban} to value "ban-logs" from config
            if {_ban} is true:
                broadcast "ban-logs=true bulundu!"
            else if {_ban} is false:
                broadcast "ban-logs=false bulundu!"
            else:
                broadcast "ban-logs değeri geçersiz!"
        else:
            broadcast "Dosya bulunamadı!"
Kod:
[22:27:30 INFO]: [Skript] Reloading mashlylogs.sk...
[22:27:30 INFO]: Line 5: (mashlylogs.sk)
[22:27:30 INFO]:     Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section.
[22:27:30 INFO]:     Line: variables:
[22:27:30 INFO]:
[22:27:30 INFO]: Line 52: (mashlylogs.sk)
[22:27:30 INFO]:     Can't understand this condition/effect: load yaml file "plugins/MashlyLogs/config.yml" as config
[22:27:30 INFO]:     Line: load yaml file "plugins/MashlyLogs/config.yml" as config
[22:27:30 INFO]:
[22:27:30 INFO]: Line 53: (mashlylogs.sk)
[22:27:30 INFO]:     Can't understand this expression: 'value "ban-logs" from config'
[22:27:30 INFO]:     Line: set {_ban} to value "ban-logs" from config
[22:27:30 INFO]:
[22:27:30 INFO]: [Skript] Encountered 2 errors while reloading mashlylogs.sk! (120ms)
 
(Oyuncuya özel data)
JavaScript:
set yaml value "test" in "data-%player%" to false #ifade değiştirmek için kullanılır.

save yaml "data-%player%" # değiştirdiğiniz değişkeni daha sonra kaydetmek için kullanılır.

set {_stats} to yaml value "test" in "data-%player%" #ifade çekmek için kullanılır.

    if {_stats} is false: #{_test} #çektiğiniz ifadeyi burada kontrol edersiniz.
Skript-yaml gerektirir. Ayrıca diğer Addon'lar ile ne yaptığınızı sorabilir miyim, Skript'in yeni sürümlerinde skQuery ve skRayFall biraz gereksiz kalıyor.
 
Kod:
[22:27:30 INFO]: [Skript] Reloading mashlylogs.sk...
[22:27:30 INFO]: Line 5: (mashlylogs.sk)
[22:27:30 INFO]:     Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section.
[22:27:30 INFO]:     Line: variables:
[22:27:30 INFO]:
[22:27:30 INFO]: Line 52: (mashlylogs.sk)
[22:27:30 INFO]:     Can't understand this condition/effect: load yaml file "plugins/MashlyLogs/config.yml" as config
[22:27:30 INFO]:     Line: load yaml file "plugins/MashlyLogs/config.yml" as config
[22:27:30 INFO]:
[22:27:30 INFO]: Line 53: (mashlylogs.sk)
[22:27:30 INFO]:     Can't understand this expression: 'value "ban-logs" from config'
[22:27:30 INFO]:     Line: set {_ban} to value "ban-logs" from config
[22:27:30 INFO]:
[22:27:30 INFO]: [Skript] Encountered 2 errors while reloading mashlylogs.sk! (120ms)
Bir kaç düzeltme yaptım test etmedim ama deneyebilirsiniz.
Kod:
on load:
    if file "plugins/Deneme/config.yml" doesn't exist:
        create new file "plugins/Deneme/config.yml"
        write "ban-logs: true" to file "plugins/Deneme/config.yml"
        write "commands-logs: true" to file "plugins/Deneme/config.yml"
        write "deaths-logs: true" to file "plugins/Deneme/config.yml"
        write "dropitem-logs: true" to file "plugins/Deneme/config.yml"
        write "getitem-logs: true" to file "plugins/Deneme/config.yml"
        write "mute-logs: true" to file "plugins/Deneme/config.yml"
        write "warn-logs: true" to file "plugins/Deneme/config.yml"
        write "worldchange-logs: true" to file "plugins/Deneme/config.yml"

command /deneme:
    trigger:
        if file "plugins/Deneme/config.yml" exists:
            set {_config} to yaml value of file "plugins/Deneme/config.yml"
            set {_ban} to yaml value "ban-logs" from {_config}
            if {_ban} is true:
                broadcast "ban-logs=true bulundu!"
            else if {_ban} is false:
                broadcast "ban-logs=false bulundu!"
            else:
                broadcast "ban-logs değeri geçersiz!"
        else:
            broadcast "Dosya bulunamadı!"
 
Bir kaç düzeltme yaptım test etmedim ama deneyebilirsiniz.
Kod:
on load:
    if file "plugins/Deneme/config.yml" doesn't exist:
        create new file "plugins/Deneme/config.yml"
        write "ban-logs: true" to file "plugins/Deneme/config.yml"
        write "commands-logs: true" to file "plugins/Deneme/config.yml"
        write "deaths-logs: true" to file "plugins/Deneme/config.yml"
        write "dropitem-logs: true" to file "plugins/Deneme/config.yml"
        write "getitem-logs: true" to file "plugins/Deneme/config.yml"
        write "mute-logs: true" to file "plugins/Deneme/config.yml"
        write "warn-logs: true" to file "plugins/Deneme/config.yml"
        write "worldchange-logs: true" to file "plugins/Deneme/config.yml"

command /deneme:
    trigger:
        if file "plugins/Deneme/config.yml" exists:
            set {_config} to yaml value of file "plugins/Deneme/config.yml"
            set {_ban} to yaml value "ban-logs" from {_config}
            if {_ban} is true:
                broadcast "ban-logs=true bulundu!"
            else if {_ban} is false:
                broadcast "ban-logs=false bulundu!"
            else:
                broadcast "ban-logs değeri geçersiz!"
        else:
            broadcast "Dosya bulunamadı!"
Skript 2.6.3 İçin hangi Skript-YAML sürümü işe yarar?
 
Genellikle Skript sürümleriyle uyumlu eklentilerin en güncel sürümlerinin kullanılması önerilir.
Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.
Değerli ziyaretçimiz, içeriği görebilmek için şimdi giriş yapın veya kayıt olun.
daha fazla bilgi bulabilir ve uyumlu sürümleri kontrol edebilirsiniz.
Kod:
options:

    fiyat: 50

    tüm envanter: 3000

 

function tamir(p:player):

    set {_p}'s metadata "TAMIR" to chest inventory with 5 rows named "Tamir Menüsü"

    set {_} to {_p}'s metadata "TAMIR"

    set {_f} to {@fiyat}

    add 100 to {_f} if {_p}'s tool = any sword

    add 300 to {_f} if {_p}'s tool is enchanted

    add 400 to {_f} if {_p}'s tool = any armor

    add 100 to {_f} if {_p}'s tool = diamond sword

    set slot numbers between 0 and 9, 17, 26, 35, 44, 18, 27 and 36, numbers between 37 and 43 of {_} to black stained glass pane named " "

    set slot 20 of {_} to {_p}'s tool with lore "&7Fiyat&8: &e&l%{_f}% TL" if {_p}'s tool != air

    set slot 20 of {_} to barrier named "&cEşya Bulunamadı" with lore "" and "&c&lELİNDE EŞYA YOK!" if {_p}'s tool = air

    set slot 22 of {_} to chest named "&eEnvanter" with lore "&7Envanterindeki tüm eşyaları", "&7tamir eder&8.", "", "&7Fiyat&8: &e&l{@tüm envanter} TL", "" and "&e&lTIKLA!"

    set slot 24 of {_} to ender chest named "&eEnvanterden Seç" with lore "&7Envanterini görüntüle", "&7ve eşyaları seçerek tamir et&8.", "" and "&e&lTIKLA!"

    open {_} to {_p}

function envanter(p:player):

    set {_p}'s metadata "TENV" to chest inventory with 6 rows named "Envanterin"

    set {_} to {_p}'s metadata "TENV"

    set slot numbers between 45 and 53, 43 and 44, 36 and 37 of {_} to black stained glass pane named " "

    set slot 49 of {_} to arrow named "&eGeri Dön" with lore "&7Tamir menüsüne", "&7geri döner&8.", "" and "&e&lTIKLA!"

    open {_} to {_p}

    set {_.} to 0

    loop items in {_p}'s inventory:

        set {_.} to 38 if {_.} = 36 or 37

        loop-value's durability > 0

        set {_f} to {@fiyat}

        add 100 to {_f} if loop-value = any sword

        add 300 to {_f} if loop-value is enchanted

        add 400 to {_f} if loop-value = any armor

        add 100 to {_f} if loop-value = diamond sword   

        set slot {_.} of {_} to loop-value with lore "&7Fiyat&8: &e&l%{_f}% TL"

        add 1 to {_.}

    set slot 22 of {_} to barrier named "&c&lEŞYA BULUNAMADI" if slot 0 of {_} = air

    stop

command tamir:

    trigger:

        tamir(player)

inventory click:

    event-inventory = player's metadata "TAMIR":

        cancel event

        envanter(player) if event-slot's index = 24

        event-slot's index = 20:

            event-slot != barrier

            event-slot's durability > 0:

                set {_f} to {@fiyat}

                add 100 to {_f} if event-slot = any sword

                add 300 to {_f} if event-slot is enchanted

                add 400 to {_f} if event-slot = any armor

                add 100 to {_f} if event-slot = diamond sword

                player's balance >= {_f}:

                    close player's inventory

                    repair player's tool

                    remove {_f} from player's balance

                    send "&e&lTAMIR &7Eşya tamir edildi&8."

                    send "&e&lTAMIR &7Eski bakiye&8: &e$%player's balance + {_f}%"

                    send "&e&lTAMIR &7Yeni bakiye&8: &e%player's balance%"

                else:

                    send "&c&lHATA! &7Bakiye yetersiz&8. (&e%player's balance%&8/&6$%{_f}%&8)"

            else:

                send "&c&lHATA &7Bu eşya tamir edilemez&8, &7zaten sağlam&8!"

        event-slot's index = 22:

            player's balance >= {@tüm envanter}:

                repair items in player's inventory

                remove {@tüm envanter} from player's balance

                close player's inventory

                send "&e&lTAMIR &7Eşyalar tamir edildi&8."

                send "&e&lTAMIR &7Eski bakiye&8: &e$%player's balance + {@tüm envanter}%"

                send "&e&lTAMIR &7Yeni bakiye&8: &e%player's balance%"

            else:

                send "&c&lHATA! &7Bakiye yetersiz&8. (&e%player's balance%&8/&6${@tüm envanter}&8)"

        stop

    event-inventory = player's metadata "TENV":

        cancel event

        tamir(player) if event-slot's index = 49

        event-slot != black stained glass pane named " " or barrier

        event-slot's index != 49

        set {_f} to {@fiyat}

        add 100 to {_f} if event-slot = any sword

        add 300 to {_f} if event-slot is enchanted

        add 400 to {_f} if event-slot = any armor

        add 100 to {_f} if event-slot = diamond sword

        loop items in player's inventory:

            "%event-slot%" = "%loop-value%"

            player's balance >= {_f}:

                repair loop-value

                exit loop

            else:

                send "&c&lHATA! &7Bakiye yetersiz&8. (&e%player's balance%&8/&6$%{_f}%&8)"

                exit loop

        envanter(player) if event-slot != air

        stop

Eklenti çalışıyor olarak gözüküyor ama yine hata alıyorum.
 
Moderatör tarafından düzenlendi:
[17:53:39 INFO]: [Skript] Line 49: (mashlylogs.sk)
[17:53:39 INFO]: Can't understand this expression: 'yaml value of file "plugins/MashlyLogs/config.yml"'
[17:53:39 INFO]: Line: set {_config} to yaml value of file "plugins/MashlyLogs/config.yml"
[17:53:39 INFO]:

Eklenti çalışıyor olarak gözüküyor ama yine hata alıyorum.
Bu hata genellikle Skript’in belirli bir ifadeyi veya eylemi tanımadığını gösterir. Hata, Skript’in yaml value of file ifadesini tanımadığını belirtiyor. Bu durum genellikle bir eklenti eksik olduğunda veya yanlış yazıldığında ortaya çıkar.

yaml value of file ifadesi, genellikle skript-yaml eklentisi ile kullanılır. Bu eklenti yüklü olmalı ve doğru şekilde yapılandırılmış olmalıdır. Eğer bu eklenti zaten yüklüyse, sözdiziminin doğru olduğundan emin olun. Örneğin:

JavaScript:
on script load:
    set {_config} to yaml value of "path.to.value" from file "plugins/MashlyLogs/config.yml"
Eğer hala sorun yaşıyorsanız, Skript ve skript-yaml eklentisinin en son sürümlerini yüklediğinizden emin olun.
 
Bu hata genellikle Skript’in belirli bir ifadeyi veya eylemi tanımadığını gösterir. Hata, Skript’in yaml value of file ifadesini tanımadığını belirtiyor. Bu durum genellikle bir eklenti eksik olduğunda veya yanlış yazıldığında ortaya çıkar.

yaml value of file ifadesi, genellikle skript-yaml eklentisi ile kullanılır. Bu eklenti yüklü olmalı ve doğru şekilde yapılandırılmış olmalıdır. Eğer bu eklenti zaten yüklüyse, sözdiziminin doğru olduğundan emin olun. Örneğin:

JavaScript:
on script load:
    set {_config} to yaml value of "path.to.value" from file "plugins/MashlyLogs/config.yml"
Eğer hala sorun yaşıyorsanız, Skript ve skript-yaml eklentisinin en son sürümlerini yüklediğinizden emin olun.
Skript-YAML başarıyla çalışıyor fakat işe yaramıyor.
 
Skript-yaml sürümünüzü kontrol etmenizde fayda var.
Benim kullandığım sürüm: Skript-yaml 1.4 (Api version 1.13)
Sunucu sürümü: 1.17.1
Sürüm link: https://github.com/Sashie/skript-yaml/releases/tag/v1.4 1.4

Çalışan kod:
JavaScript:
on load:
    loadYaml()                                                            #skript yeniden yüklendiğinde aktif olur

function loadYaml():                                                   #fonksiyon kullanarak istediğimiz yaml dosyalarını ekliyoruz

    load yaml "plugins/dosyaAdı/test.yml" as "test"                    #dosyayı oluşturur
    
    yaml path "test1" in "test" doesn't exist:                           #eğer değer yoksa işlem alt satırdan devam eder
    
        set yaml value "test1" from "test" to "test"                   #değer belirler
        
    save yaml "test"                                                    #belirlenen yaml dosyası kayıt edilir
    
command /test:
    trigger:
        yaml value "test1" from "test" is "test":                      #eğer "test1" değeri "test" ise
        
            set {_degerBelirleme} to yaml value "test1" from "test"    #belirlediğimiz değeri geçici değişkene ayarlar
            
            send "&aDeğer belirlendi! %{_degerBelirleme}%"             #belirlediğimiz değeri gösterir
        else:
            send "&cDeğer yanlış."

file location:
f.png

debug:
sssss21.png

SkInfo:
2.png
 
Skript-yaml sürümünüzü kontrol etmenizde fayda var.
Benim kullandığım sürüm: Skript-yaml 1.4 (Api version 1.13)
Sunucu sürümü: 1.17.1
Sürüm link: https://github.com/Sashie/skript-yaml/releases/tag/v1.4 1.4

Çalışan kod:
JavaScript:
on load:
    loadYaml()                                                            #skript yeniden yüklendiğinde aktif olur

function loadYaml():                                                   #fonksiyon kullanarak istediğimiz yaml dosyalarını ekliyoruz

    load yaml "plugins/dosyaAdı/test.yml" as "test"                    #dosyayı oluşturur
   
    yaml path "test1" in "test" doesn't exist:                           #eğer değer yoksa işlem alt satırdan devam eder
   
        set yaml value "test1" from "test" to "test"                   #değer belirler
       
    save yaml "test"                                                    #belirlenen yaml dosyası kayıt edilir
   
command /test:
    trigger:
        yaml value "test1" from "test" is "test":                      #eğer "test1" değeri "test" ise
       
            set {_degerBelirleme} to yaml value "test1" from "test"    #belirlediğimiz değeri geçici değişkene ayarlar
           
            send "&aDeğer belirlendi! %{_degerBelirleme}%"             #belirlediğimiz değeri gösterir
        else:
            send "&cDeğer yanlış."

file location:
Ekli dosyayı görüntüle 236862
debug:
Ekli dosyayı görüntüle 236863
SkInfo:
Ekli dosyayı görüntüle 236864
set "prefix" to "&6&lFLEX&e&lNW &8»" in yaml file "plugins/MashlyLogs/config.yml"
Böyle birşey denedim fakat aşağıdaki hatayı verdi;


Kod:
[19:14:30 INFO]: [Skript] Reloading mashlylogs.sk...
[19:14:30 INFO]: Line 55: (mashlylogs.sk)
[19:14:30 INFO]:     "prefix" can't be set to anything
[19:14:30 INFO]:     Line: set "prefix" to "&6&lFLEX&e&lNW &8»" in yaml file "plugins/MashlyLogs/config.yml"
[19:14:30 INFO]:
[19:14:30 INFO]: [Skript] Encountered 1 error while reloading mashlylogs.sk! (154ms)

Screenshot_1.png
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Hala Discord sunucumuza katılmadın mı?

Büyük bir topluluğun parçası ol, etkinliklere katıl ve özel hediyeler kazanma şansı yakala!

Şimdi Katıl