Yardım Listedeki isimi if ile kontrol edip veri alamıyorum

ChocolateStation

Kömür Madencisi
Mesajlar
119
En iyi cevaplar
0
Beğeniler
45
Puanları
140
Skript sürümünüz 2.2 ise böyle bir sorunla karşılaşıyorsunuzdur muhtemelen. Bu sürümde contains bozuk. Size alıntı bir fonksiyon verebilirim bununla deneyin isterseniz.


Kod:
function contains(list: objects, check: object) :: boolean:
    loop {_list::*}:
        if loop-value is {_check}:
            return true
    return false

Kullanım şekli:


Kod:
add "a", "bunch", "of", "list", "items", "to", and "check" to {_list::*}
 
if contains({_list::*}, "check") is true:
    send "Yep! The list does indeed contain 'check'"
 

Üst