Funkcja w evencie nie wykonuje się. Ale jeżeli użyje jej w komendzie to nagle działa. Czym to może być spowodowane?
function test(liczba: integer):
set {_result} to 1 + {_liczba}
send "%{_result}%" to all players
on inventory click:
set {_index} to index of event-slot
test({_index}) #Tutaj nie działa
command /test <integer>:
trigger:
test(arg-1) #Tutaj działa
Pytanie
Skiuel 18
Funkcja w evencie nie wykonuje się. Ale jeżeli użyje jej w komendzie to nagle działa. Czym to może być spowodowane?
function test(liczba: integer): set {_result} to 1 + {_liczba} send "%{_result}%" to all players on inventory click: set {_index} to index of event-slot test({_index}) #Tutaj nie działa command /test <integer>: trigger: test(arg-1) #Tutaj działaPrzykład kodu
Edytowane przez SkiuelOdnośnik do komentarza
https://skript.pl/temat/48450-funkcja-w-evencie-nie-wykonuje-si%C4%99/Udostępnij na innych stronach
4 odpowiedzi na to pytanie
Rekomendowane odpowiedzi