Skocz do zawartości
  • 0

Błąd w komendzie.


LosTigeros
 Udostępnij

Pytanie

Witam!

Mam taką komendę:

command /cmdsklep <text> <item> <number> <text> <integer>:        usage: /cmdsklep <sell/kup> <item> <kasa> <nazwa itemu> <ilosc>        executable by: players        trigger:                arg 1 is "sell":                        if player contains arg 5 arg 2:                                execute console command "/eco give %player% %arg 3%"                                message "Sprzedales %arg 4%: %arg 2% za %arg 3%."                                remove arg 5 arg 2 from the player                        else:                                message "Nie masz tego itemu!"                arg 1 is "kup":                        if {money.%player%} is greater than or equal to arg 3:                                execute console command "/eco take %player% %arg 3%"                                message "Kupiles %arg 4% za %arg 3%."                                add arg 5 arg 2 to player                        else:                                message "Nie stac Cie na %arg 4%."
 

Oraz mam takie błędy:

[16:57:00 INFO]: [Skript] Reloading sklep.sk...[16:57:01 ERROR]: 'arg 5' is not a type (sklep.sk, line 6: if player contains arg 5 arg 2:')[16:57:01 ERROR]: 'else' has to be placed just after an 'if' or 'else if' section (sklep.sk, line 10: else:')[16:57:01 ERROR]: 'arg 5' is not a type (sklep.sk, line 16: add arg 5 arg 2 to player')[16:57:01 INFO]: [Skript] Encountered 3 errors while reloading sklep.sk!
 

Jak te błędy naprawić?

PS: Przepraszam za 2 tematy. Wyświetliło mi błąd że serwer nie może dokończyć post'a i odświeżyłem stronę. Wtedy dodało 2-gi temat.

Edytowane przez LosTigeros
Odnośnik do komentarza
Udostępnij na innych stronach

7 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Sprawdzam po prostu komendy. Właśnie chciałem aby gracz mógł sprzedać / kupić daną ilość sztuk. Ale nawet jeśli bym wpisał określoną, to błąd by wystąpił przy:

if player contains 64 arg 2:

i przy:

remove 64 arg 2 from the playeradd 64 arg 2 to player
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
#komenda /cmd typ     ID    ilosc    kwota  nazwa-itemucommand /cmd <text> <item> <number> <number> <text>:	executable by: players	trigger:		If arg 1 is "sell":			if player contains arg 3 of arg 2:				execute console command "/eco give %player% %arg 4%"				message "&9Sprzedales &6%arg 3% &b%arg 2% &9za &6%arg 3%."				remove arg 3 of arg 5 from the player			else:				message "&4Nie masz &6%arg 3% &b%arg 2%!"		else if arg 1 is "kup":			if player's money is greater than or equal to arg 4:				execute console command "/eco take %player% %arg 4%"				execute console command "/give %player% %arg 5% %arg 3%"				message "&9Kupiles &6%arg 3% &b%arg 2% &9za &6%arg 3%."							else:				message "&4Nie stac Cie na &6%arg 3% &b%arg 2%!"		else:			message "&4Skontaktuj sie z Adminem!"
[16:46:39 INFO]: [Skript] Reloading sklep2.sk...[16:46:39 ERROR]: 'arg 3 of' is not a type (sklep2.sk, line 8: remove arg 3 of arg 5 from the player')[16:46:39 INFO]: [Skript] Encountered 1 error while reloading sklep2.sk!
Edytowane przez LosTigeros
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

@up

Spróbuj:

#komenda /cmd typ     ID    ilosc    kwota  nazwa-itemucommand /cmd <text> <item> <number> <number> <text>:	executable by: players	trigger:		If arg 1 is "sell":			if player contains arg 3 of arg 2:				execute console command "/eco give %player% %arg 4%"				message "&9Sprzedales &6%arg 3% &b%arg 2% &9za &6%arg 3%."				remove arg 3 from arg 5 from the player			else:				message "&4Nie masz &6%arg 3% &b%arg 2%!"		else if arg 1 is "kup":			if player's money is greater than or equal to arg 4:				execute console command "/eco take %player% %arg 4%"				execute console command "/give %player% %arg 5% %arg 3%"				message "&9Kupiles &6%arg 3% &b%arg 2% &9za &6%arg 3%."							else:				message "&4Nie stac Cie na &6%arg 3% &b%arg 2%!"		else:			message "&4Skontaktuj sie z Adminem!"
Edytowane przez _Kacpross
Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

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