Skocz do zawartości
  • 0

co robię źle? (Nauka pisania skryptów)


Pytanie

witam, uczę się pisać skrypty i mam pytanko, bo nie wiem co robię źle:

2014-07-11 16:04:52 [SEVERE] [Skript] can't understand this condition: 'trigger' (test.sk, line 2: 'trigger:')2014-07-11 16:04:52 [SEVERE] [Skript] Can't understand this condition/effect: executable by: player and console (test.sk, line 8: 'executable by: player and console')2014-07-11 16:04:52 [SEVERE] [Skript] can't understand this condition: 'trigger' (test.sk, line 9: 'trigger:')

bez triggera jest tak:

2014-07-11 16:10:45 [SEVERE] [Skript] 'horse at player' is not an entity type (test.sk, line 2: 'spawn 1 undead horse at player')2014-07-11 16:10:45 [SEVERE] [Skript] 'horse at player' is not an entity type (test.sk, line 3: 'spawn 1 skeleton horse at player')2014-07-11 16:10:45 [SEVERE] [Skript] Can't understand this condition/effect: executable by: player and console (test.sk, line 7: 'executable by: player and console')

A oto mój mój skrypt:

on command "kon":        spawn 1 undead horse at player        spawn 1 skeleton horse at player        stopon command "op":        executable by: player and console        cancel event        send "Nope :D"        stop
Odnośnik do komentarza
https://skript.pl/temat/1475-co-robi%C4%99-%C5%BAle-nauka-pisania-skrypt%C3%B3w/
Udostępnij na innych stronach

10 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Domyslnie nie ma takiej komendy jak /kon, wiec musisz stworzyc nowa

command /kon:    trigger:        spawn 1 undead horse at location of player        spawn 1 skeleton horse at location of player        stop

W evencie "On command" nie dajemy triggerow, tylko do komend wlasnych

Zaleta SK jest to ze mozesz tworzyc wlasne komendy, ktore zastepuja bazowe komendy, jesli takowe istnieja.

Czl

command /op:    trigger:        send "Nope :D"

Domyslnie komenda jest egzekwowana przez console/gracza, ale jak wtedy dac komus op przez konsole?

Jest na to sposob:

command /op [<offlineplayer&gt]:    trigger:        executor is player:            send "Nope :D"        else:            if arg is set:                op the arg            else:                send "Musisz wpisac nazwe gracza, ktoremu chcesz dac OP!"

Licze na like :]

 

//Co do pierwszego, mozesz dac po prostu "spawn undead horse at player" :O

Odnośnik do komentarza
https://skript.pl/temat/1475-co-robi%C4%99-%C5%BAle-nauka-pisania-skrypt%C3%B3w/#findComment-11814
Udostępnij na innych stronach

  • 0

Dzięki, teraz już wiem o co chodzi :)

 

A OP nawet admin mieć nie będzie u mnie :)

 

-----

Edit:

2014-07-11 16:29:15 [SEVERE] [Skript] invalid line - all code has to be put into triggers (test.sk, line 1: '[code]')2014-07-11 16:29:15 [SEVERE] [Skript] 'spawn 1 undead horse at player' is not an entry (like 'name : value') (test.sk, line 3: 'spawn 1 undead horse at player')2014-07-11 16:29:15 [SEVERE] [Skript] 'spawn 1 skeleton horse at player' is not an entry (like 'name : value') (test.sk, line 4: 'spawn 1 skeleton horse at player')2014-07-11 16:29:15 [SEVERE] [Skript] 'stop' is not an entry (like 'name : value') (test.sk, line 5: 'stop')2014-07-11 16:29:15 [SEVERE] [Skript] Required entry 'trigger' is missing in 'command /kon' (test.sk, starting at line 2) (test.sk, line 2: 'command /kon:')2014-07-11 16:29:15 [SEVERE] [Skript] 'cancel event' is not an entry (like 'name : value') (test.sk, line 7: 'cancel event')2014-07-11 16:29:15 [SEVERE] [Skript] 'stop' is not an entry (like 'name : value') (test.sk, line 9: 'stop')2014-07-11 16:29:15 [SEVERE] [Skript] Required entry 'trigger' is missing in 'command /op' (test.sk, starting at line 6) (test.sk, line 6: 'command /op:')2014-07-11 16:29:15 [SEVERE] [Skript] Unexpected entry 'send to player "Nope'. Check whether it's spelled correctly or remove it. (test.sk, line 8: 'send to player "Nope :D"')2014-07-11 16:29:15 [SEVERE] [Skript] invalid line - all code has to be put into triggers (test.sk, line 10: '[/code]')

abo ja jestem dziwny albo trzeba mi tłumaczyć jak wieśniakowi :)

[code]command /kon:        spawn 1 undead horse at player        spawn 1 skeleton horse at player        stopcommand /op:        cancel event        send to player "Nope :D"        stop[/code]

lub:

 

[code]command /kon:        spawn 1 undead horse at player        spawn 1 skeleton horse at player        stop[/code][code]command /op:        cancel event        send to player "Nope :D"        stop[/code]

Co nadal robię źle?

Edytowane przez Sabat
Odnośnik do komentarza
https://skript.pl/temat/1475-co-robi%C4%99-%C5%BAle-nauka-pisania-skrypt%C3%B3w/#findComment-11816
Udostępnij na innych stronach

  • 0

Jak mowilem, po kazdej wlasnej komendzie musisz dawac w nastepnej linicje "trigger:"

Gdy tworzysz wlasna komende, nie dawaj cancel event przed kodem, bo to calkowicie zatrzyma dalsze wykonywanie skryptu, podobnie jak stop.

Uzyj tego co napisalem @UP, bo uzyles swojego.

command /kon:    trigger:        spawn 1 undead horse at player        spawn 1 skeleton horse at player        stop
command /op:    trigger:        send "Nope :D"        stop

Na przyszlosc, czytaj komunikaty bledow, bo one bardzo wiele tlumacza co zrobilismy zle ;)

 

I gdy wklejasz skrypt, to usuwaj wyrazy typu

 [./code] [url], itd, itp
Odnośnik do komentarza
https://skript.pl/temat/1475-co-robi%C4%99-%C5%BAle-nauka-pisania-skrypt%C3%B3w/#findComment-11824
Udostępnij na innych stronach

  • 0
command /kon:    trigger:        spawn 1 undead horse at player        spawn 1 skeleton horse at player        stopcommand /op:    trigger:        send to player "Nope :D"        stop

a w konsolce cały czas to samo:

2014-07-11 17:29:08 [SEVERE] [Skript] 'horse at player' is not an entity type (test.sk, line 3: 'spawn 1 undead horse at player')2014-07-11 17:29:08 [SEVERE] [Skript] 'horse at player' is not an entity type (test.sk, line 4: 'spawn 1 skeleton horse at player')2014-07-11 17:29:08 [SEVERE] [Skript] 'to player "Nope :D"' is not a text (test.sk, line 8: 'send to player "Nope :D"')

I nie rozumiem o co mu chodzi z: 'horse at player'

Odnośnik do komentarza
https://skript.pl/temat/1475-co-robi%C4%99-%C5%BAle-nauka-pisania-skrypt%C3%B3w/#findComment-11835
Udostępnij na innych stronach

  • 0

Albo tak jak pisalem @6UP, moze byc tez:

at location of player

Bledow juz zadnych nie powinno wywalac, ale w razie dalszych problemow, z dalszymi skryptami prosze o kontakt na PW :3

Odnośnik do komentarza
https://skript.pl/temat/1475-co-robi%C4%99-%C5%BAle-nauka-pisania-skrypt%C3%B3w/#findComment-11844
Udostępnij na innych stronach

  • 0

no może ale je jestem za bardzo boski i próbowałem to garnąć "przy okazji" na 1.6.4 gdzie nie było takich zwierząt :) 
(sorki ale jakoś zapomniało mi się xd)

 

a z op'em działa, ogarnąłem to ok 18:40 z tz: send "tekst" to player, i poblokowałem dla adminów ok 80% komend i już nie ma tak fajnie i nie kusi konsolka do oszukiwania :0 :) :)

Edytowane przez Sabat
Odnośnik do komentarza
https://skript.pl/temat/1475-co-robi%C4%99-%C5%BAle-nauka-pisania-skrypt%C3%B3w/#findComment-11934
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ę...