Skocz do zawartości
  • 0

Skrypt na różdżki:Taby i triggery


Pytanie

Mam problem, otóż chcę napisać podstawowy skrypt na różdżki

 

on right click holding a blaze rod
 If name of the player's tool is "Ogien"
   If player's has permission "ogien.ogien"
     shoot fireball from the player
     else:
       send "Nie mozesz uzyc tej Rozdzki"
   if the name of the player's tool is "Piorun"
   if player's has permission piorun.piorun
     strike lightning at the targeted block

 

Ale gdy wpisuję /sk reload shootfireball

Pokazuje mi że zadużo jest tabów.Dokładnie że nie powinno byc ani jednego.

Gdy usuwam wszystkie taby to z kolei pisze że musi być w triggerach

Dodałem triggery ale znowu że nie może odczytac trigger i że kod musi być w triggerach

Już nic nie rozumiem

Odnośnik do komentarza
https://skript.pl/temat/335-skrypt-na-r%C3%B3%C5%BCd%C5%BCkitaby-i-triggery/
Udostępnij na innych stronach

8 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Gdy w następnej linijce jest o 1 tab więcej to w poprzedniej na końcu musi być dwukropek

[+] Tą wiadomość wyklikałem z wielkim trudem na moim Sramsungu Galakty Trend Plus [+]

Odnośnik do komentarza
https://skript.pl/temat/335-skrypt-na-r%C3%B3%C5%BCd%C5%BCkitaby-i-triggery/#findComment-1587
Udostępnij na innych stronach

  • 0

Wersja wytabowana: https://code.skript.pl/HCsPygoo/

 

Zamieniłem spacje na taby, ponieważ napisałeś o tabach, a wkleiło Ci się z spacjami. :)

 

Powinno działać, yo.

 

//edit

poprawiony jeden błąd

 

//następny edit

 

Czemu w jednym ifie masz the, a w drugim już nie? :) Linijki: 2 i 7

Edytowane przez Ewald
Odnośnik do komentarza
https://skript.pl/temat/335-skrypt-na-r%C3%B3%C5%BCd%C5%BCkitaby-i-triggery/#findComment-1588
Udostępnij na innych stronach

  • 0

@up nie działa

@up dodałem : do mojej wersji i wersji poprawionej

 

 

Bez : mam errory o tabach a z nimi

 

permission ogien.ogien is not an item type

else has to be placed just after if or else if

permission piorun.piorun is not an item type

Odnośnik do komentarza
https://skript.pl/temat/335-skrypt-na-r%C3%B3%C5%BCd%C5%BCkitaby-i-triggery/#findComment-1589
Udostępnij na innych stronach

  • 0

on right click holding a blaze rod:        if name of player's tool is "Ogien":                if player has permission "ogien.ogien":                        shoot fireball from the player                else:                        send "Nie mozesz uzyc tej Rozdzki"                        If name of player's tool is "Piorun":                                if player has permission piorun.piorun                                        strike lightning at the targeted block

Wytabuj bo pisalem na tablecie

Odnośnik do komentarza
https://skript.pl/temat/335-skrypt-na-r%C3%B3%C5%BCd%C5%BCkitaby-i-triggery/#findComment-1590
Udostępnij na innych stronach

  • 0
on right click holding a blaze rod:	if name of the player's tool is "Ogien":		if player has permission "ogien.ogien":			shoot fireball from the player		else:			send "Nie mozesz uzyc tej Rozdzki"	if the name of the player's tool is "Piorun":		if player has permission "piorun.piorun":			strike lightning at the targeted block

Linijka zaczynająca się na if musi się kończyć dwukropkiem, a następna musi być wcięta o jeden stopień. Wszystkie zdarzenia muszą się kończyć dwukropkiem, a cały kod musi być wcięty. Uprawnienia muszą być ujęte w cudzysłowy.

Odnośnik do komentarza
https://skript.pl/temat/335-skrypt-na-r%C3%B3%C5%BCd%C5%BCkitaby-i-triggery/#findComment-1591
Udostępnij na innych stronach

  • 0

on right click holding a blaze rod:    if the name of the player's tool is "Ogien":	    if player has permission "ogien.ogien":			shoot a fireball from the player		else:			send "Nie mozesz uzyc tej Rozdzki"	if the name of the player's tool is "Piorun":		if player has permission "piorun.piorun":			strike lightning at the targeted block
Odnośnik do komentarza
https://skript.pl/temat/335-skrypt-na-r%C3%B3%C5%BCd%C5%BCkitaby-i-triggery/#findComment-1595
Udostępnij na innych stronach

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ę...