Skript error

Technická podpora k herním serverům Minecraft a Tekkit
Message
Autor
Uživatelský avatar
nejento
Příspěvky: 9815
Registrován: 28 lis 2011, 14:09
Reputation: 55
Kontaktovat uživatele:

Re: Skript error

#11 Příspěvekod nejento » 15 lis 2017, 12:16

Rád bych poprosil všechny ostatní přispěvatele, aby zanechali zbytečnch komentářů a zanechali tak zavádění tématu tam, kam není nutno jej zavádět.
Skript, který píšeš může být chybný, což takto nelze přesně určit, jelikož jsi ten daný skript níkomu nezaslal. Pokud chceš, aby ti bylo pomoženo, pošli sem daný skript do Code bloků a pokud možno i latest.log po startu serveru. Poté se může najít někdo, kdo ti bude schopen konstruktivně odpovědět.
Obrázek

Obrázek Přidejte se ke komunitě zákazníků na FakaHeda.eu Discord! Poznejte nové lidi nebo vyřešte svůj technický problém živě: http://discord.fakaheda.eu/

ZiDyPL
Příspěvky: 295
Registrován: 13 dub 2015, 22:01
Reputation: 17

Re: Skript error

#12 Příspěvekod ZiDyPL » 16 lis 2017, 07:43

nejento, v tom erroru, co nám poslal je vidět, že skript je dobře napsán. K tématu: nevím, jestli už na 1.12.2 je Skript naportován, ale zkus hledat - tenhle očividně nefunguje.

Uživatelský avatar
Ritchy
Příspěvky: 219
Registrován: 07 čer 2016, 17:14
Reputation: 2

Re: Skript error

#13 Příspěvekod Ritchy » 18 lis 2017, 08:50

Zde to je:
Spoiler: zobrazit
on script load:
uses old loops

# {passblock_write::hrac} - k jakemu indexu pise hrac heslo
# {passblock_pass::index} - jake heslo je nastaveno ("" pokud neni)
# {passblock_loc::index} - lokace PassBlocku
# {passblock_time::index} - kolik casu zbyva do promeny zpet na iron block

on skript load:
delete {passblock_write::*}

on join:
delete {passblock_write::%event-player%}

every tick:
loop {passblock_time::*}:
subtract 1 from {passblock_time::%loop-index%}
if {passblock_time::%loop-index%} <= 0:
set block at {passblock_loc::%loop-index%} to iron block
delete {passblock_time::%loop-index%}

on place:
if lore of player's tool contains "PassBlock":
if world is not "Survival" or "PVP" or "World":
cancel event
message "&cPassBlock funguje jen v Survival OverWorldu!"
if lore of player's tool contains "PassBlock":
message "&aPassBlock byl polozen!"
message "&2Klikni na nej pravym pro nastaveni hesla"
add "" to {passblock_pass::*}
add event-block's location to {passblock_loc::*}

on break:
loop {passblock_loc::*}:
if event-block's location is loop-value:
set {_index} to "%loop-index%"
if {_index} is not set:
exit trigger
delete {passblock_pass::%{_index}%}
delete {passblock_loc::%{_index}%}
delete {passblock_time::%{_index}%}
loop {passblock_write::*}:
if "%loop-value%" is {_index}:
delete {passblock_write::%loop-index%}
message "&cZadavani hesla zruseno, block byl znicen!" to "%loop-index%" parsed as player
set block at event-block's location to air
drop iron block named "&bPassBlock" with lore "&ePassBlock||&7Poloz tento blok na zem a klikni na nej||&7pravym tlacitkem mysi k nastaveni hesla!"

on right click on iron block:
loop {passblock_loc::*}:
if event-block's location is loop-value:
set {_index} to "%loop-index%"
if {_index} is not set:
exit trigger
set {passblock_write::%event-player%} to {_index}
cancel event
if length of {passblock_pass::%{_index}%} is 0:
message "&e&lNapis nove heslo pro tento PassBlock:"
else:
message "&e&lZadej heslo:"

on chat:
# Pokud dela neco s PassBlockem
if {passblock_write::%event-player%} is set:
cancel event
# Zvaliduje heslo
set {_test} to "%message%"
replace all "a" in {_test} with ""
replace all "b" in {_test} with ""
replace all "c" in {_test} with ""
replace all "d" in {_test} with ""
replace all "e" in {_test} with ""
replace all "f" in {_test} with ""
replace all "g" in {_test} with ""
replace all "h" in {_test} with ""
replace all "i" in {_test} with ""
replace all "j" in {_test} with ""
replace all "k" in {_test} with ""
replace all "l" in {_test} with ""
replace all "m" in {_test} with ""
replace all "n" in {_test} with ""
replace all "o" in {_test} with ""
replace all "p" in {_test} with ""
replace all "q" in {_test} with ""
replace all "r" in {_test} with ""
replace all "s" in {_test} with ""
replace all "t" in {_test} with ""
replace all "u" in {_test} with ""
replace all "v" in {_test} with ""
replace all "w" in {_test} with ""
replace all "x" in {_test} with ""
replace all "y" in {_test} with ""
replace all "z" in {_test} with ""
replace all "0" in {_test} with ""
replace all "1" in {_test} with ""
replace all "2" in {_test} with ""
replace all "3" in {_test} with ""
replace all "4" in {_test} with ""
replace all "5" in {_test} with ""
replace all "6" in {_test} with ""
replace all "7" in {_test} with ""
replace all "8" in {_test} with ""
replace all "9" in {_test} with ""
if length of {_test} > 0:
message "&cHeslo obsahuje nepovolene znaky"
message "&6Zadavani hesla zruseno"
delete {passblock_write::%event-player%}
exit trigger
if length of "%message%" > 15:
message "&cHeslo muze obsahovat max 15 znaku"
message "&6Zadavani hesla zruseno"
delete {passblock_write::%event-player%}
exit trigger

# Nastavuje nove heslo
if length of {passblock_pass::%{passblock_write::%event-player%}%} is 0:
set {passblock_pass::%{passblock_write::%event-player%}%} to "%message%"
message "&aHeslo uspesne nastaveno na &6%message%"
delete {passblock_write::%event-player%}

# Zadava heslo
else:
if "%message%" is {passblock_pass::%{passblock_write::%event-player%}%}:
message "&bHeslo prijato!"
set block at {passblock_loc::%{passblock_write::%event-player%}%} to redstone block
set {passblock_time::%{passblock_write::%event-player%}%} to 30
delete {passblock_write::%event-player%}
else:
message "&cZadane heslo je nespravne"
message "&6Zadavani hesla zruseno"
delete {passblock_write::%event-player%}

# aby nesly posouvat PassBlocky pres piston
on piston extend:
set {_test} to 0
loop 12 times:
add 1 to {_test}
set {_loc} to block {_test} blocks in front of the event-block
loop {passblock_loc::*}:
if location of {_loc} is loop-value:
cancel event
exit trigger

# aby pri zniceni PassBlocku zmizly promenne
On explode:
loop exploded blocks:
delete {_index}
loop {passblock_loc::*}:
if loop-block's location is loop-value:
set {_index} to "%loop-index%"
if {_index} is set:
delete {passblock_pass::%{_index}%}
delete {passblock_loc::%{_index}%}
delete {passblock_time::%{_index}%}
loop {passblock_write::*}:
if "%loop-value%" is {_index}:
delete {passblock_write::%loop-index%}
message "&cZadavani hesla zruseno, block byl znicen!" to "%loop-index%" parsed as player
Nezapomeň mi dát K+, pokud jsem ti pomohl! :)

ZiDyPL
Příspěvky: 295
Registrován: 13 dub 2015, 22:01
Reputation: 17

Re: Skript error

#14 Příspěvekod ZiDyPL » 19 lis 2017, 09:23

Do code, ne do spoileru.

Uživatelský avatar
Ritchy
Příspěvky: 219
Registrován: 07 čer 2016, 17:14
Reputation: 2

Re: Skript error

#15 Příspěvekod Ritchy » 18 pro 2017, 20:44

Kód: Vybrat vše

on script load:
uses old loops

# {passblock_write::hrac} - k jakemu indexu pise hrac heslo
# {passblock_pass::index} - jake heslo je nastaveno ("" pokud neni)
# {passblock_loc::index} - lokace PassBlocku
# {passblock_time::index} - kolik casu zbyva do promeny zpet na iron block

on skript load:
delete {passblock_write::*}

on join:
delete {passblock_write::%event-player%}

every tick:
loop {passblock_time::*}:
subtract 1 from {passblock_time::%loop-index%}
if {passblock_time::%loop-index%} <= 0:
set block at {passblock_loc::%loop-index%} to iron block
delete {passblock_time::%loop-index%}

on place:
if lore of player's tool contains "PassBlock":
if world is not "Survival" or "PVP" or "World":
cancel event
message "&cPassBlock funguje jen v Survival OverWorldu!"
if lore of player's tool contains "PassBlock":
message "&aPassBlock byl polozen!"
message "&2Klikni na nej pravym pro nastaveni hesla"
add "" to {passblock_pass::*}
add event-block's location to {passblock_loc::*}

on break:
loop {passblock_loc::*}:
if event-block's location is loop-value:
set {_index} to "%loop-index%"
if {_index} is not set:
exit trigger
delete {passblock_pass::%{_index}%}
delete {passblock_loc::%{_index}%}
delete {passblock_time::%{_index}%}
loop {passblock_write::*}:
if "%loop-value%" is {_index}:
delete {passblock_write::%loop-index%}
message "&cZadavani hesla zruseno, block byl znicen!" to "%loop-index%" parsed as player
set block at event-block's location to air
drop iron block named "&bPassBlock" with lore "&ePassBlock||&7Poloz tento blok na zem a klikni na nej||&7pravym tlacitkem mysi k nastaveni hesla!"

on right click on iron block:
loop {passblock_loc::*}:
if event-block's location is loop-value:
set {_index} to "%loop-index%"
if {_index} is not set:
exit trigger
set {passblock_write::%event-player%} to {_index}
cancel event
if length of {passblock_pass::%{_index}%} is 0:
message "&e&lNapis nove heslo pro tento PassBlock:"
else:
message "&e&lZadej heslo:"

on chat:
# Pokud dela neco s PassBlockem
if {passblock_write::%event-player%} is set:
cancel event
# Zvaliduje heslo
set {_test} to "%message%"
replace all "a" in {_test} with ""
replace all "b" in {_test} with ""
replace all "c" in {_test} with ""
replace all "d" in {_test} with ""
replace all "e" in {_test} with ""
replace all "f" in {_test} with ""
replace all "g" in {_test} with ""
replace all "h" in {_test} with ""
replace all "i" in {_test} with ""
replace all "j" in {_test} with ""
replace all "k" in {_test} with ""
replace all "l" in {_test} with ""
replace all "m" in {_test} with ""
replace all "n" in {_test} with ""
replace all "o" in {_test} with ""
replace all "p" in {_test} with ""
replace all "q" in {_test} with ""
replace all "r" in {_test} with ""
replace all "s" in {_test} with ""
replace all "t" in {_test} with ""
replace all "u" in {_test} with ""
replace all "v" in {_test} with ""
replace all "w" in {_test} with ""
replace all "x" in {_test} with ""
replace all "y" in {_test} with ""
replace all "z" in {_test} with ""
replace all "0" in {_test} with ""
replace all "1" in {_test} with ""
replace all "2" in {_test} with ""
replace all "3" in {_test} with ""
replace all "4" in {_test} with ""
replace all "5" in {_test} with ""
replace all "6" in {_test} with ""
replace all "7" in {_test} with ""
replace all "8" in {_test} with ""
replace all "9" in {_test} with ""
if length of {_test} > 0:
message "&cHeslo obsahuje nepovolene znaky"
message "&6Zadavani hesla zruseno"
delete {passblock_write::%event-player%}
exit trigger
if length of "%message%" > 15:
message "&cHeslo muze obsahovat max 15 znaku"
message "&6Zadavani hesla zruseno"
delete {passblock_write::%event-player%}
exit trigger

# Nastavuje nove heslo
if length of {passblock_pass::%{passblock_write::%event-player%}%} is 0:
set {passblock_pass::%{passblock_write::%event-player%}%} to "%message%"
message "&aHeslo uspesne nastaveno na &6%message%"
delete {passblock_write::%event-player%}

# Zadava heslo
else:
if "%message%" is {passblock_pass::%{passblock_write::%event-player%}%}:
message "&bHeslo prijato!"
set block at {passblock_loc::%{passblock_write::%event-player%}%} to redstone block
set {passblock_time::%{passblock_write::%event-player%}%} to 30
delete {passblock_write::%event-player%}
else:
message "&cZadane heslo je nespravne"
message "&6Zadavani hesla zruseno"
delete {passblock_write::%event-player%}

# aby nesly posouvat PassBlocky pres piston
on piston extend:
set {_test} to 0
loop 12 times:
add 1 to {_test}
set {_loc} to block {_test} blocks in front of the event-block
loop {passblock_loc::*}:
if location of {_loc} is loop-value:
cancel event
exit trigger

# aby pri zniceni PassBlocku zmizly promenne
On explode:
loop exploded blocks:
delete {_index}
loop {passblock_loc::*}:
if loop-block's location is loop-value:
set {_index} to "%loop-index%"
if {_index} is set:
delete {passblock_pass::%{_index}%}
delete {passblock_loc::%{_index}%}
delete {passblock_time::%{_index}%}
loop {passblock_write::*}:
if "%loop-value%" is {_index}:
delete {passblock_write::%loop-index%}
message "&cZadavani hesla zruseno, block byl znicen!" to "%loop-index%" parsed as player
Nezapomeň mi dát K+, pokud jsem ti pomohl! :)

Uživatelský avatar
Ritchy
Příspěvky: 219
Registrován: 07 čer 2016, 17:14
Reputation: 2

Re: Skript error

#16 Příspěvekod Ritchy » 18 pro 2017, 20:47

Nejspíše potřebuji nějaké ADD-ONY, pokud víte o nějakých které potřebuji prosím napište mi.
Nezapomeň mi dát K+, pokud jsem ti pomohl! :)

ZiDyPL
Příspěvky: 295
Registrován: 13 dub 2015, 22:01
Reputation: 17

Re: Skript error

#17 Příspěvekod ZiDyPL » 19 pro 2017, 07:41

Ehm, potřebuješ hlavně odsazovat na začátku řádků. Tenhle skript ti na 100 % nikdy fungovat nemohl, protože nikde neodsazuješ.

Uživatelský avatar
Ritchy
Příspěvky: 219
Registrován: 07 čer 2016, 17:14
Reputation: 2

Re: Skript error

#18 Příspěvekod Ritchy » 19 pro 2017, 09:58

Ano, fungoval mě. A nerozumím ti co je to "odsazování".
Psal jsem ho já a pomáhal mě zkušený Majitel.
Tento skript jsem používal půl roku a fungoval mě i jemu.
Ale děkuji.
Nezapomeň mi dát K+, pokud jsem ti pomohl! :)

ZiDyPL
Příspěvky: 295
Registrován: 13 dub 2015, 22:01
Reputation: 17

Re: Skript error

#19 Příspěvekod ZiDyPL » 19 pro 2017, 22:46

Každý řádek ti začíná bez mezery. Zaručuju ti, že tak, jak jsi poslal skript do kódu ti nikdy nefungoval, protože je zkrátka špatně. Příklad:
DOBŘE:

Kód: Vybrat vše

on join:
 if player has cobblestone:
   broadcast "Wow, on ma cobl"

JAK TO MÁŠ TY == ŠPATNĚ:

Kód: Vybrat vše

on join:
if player has cobblestone:
broadcast "Wow, on ma cobl"

Už vidíš, co máš špatně?

Uživatelský avatar
variodriver
Příspěvky: 1160
Věk: 13
Registrován: 08 lis 2015, 00:04
Reputation: 25
Bydliště: localhost
Kontaktovat uživatele:

Re: Skript error

#20 Příspěvekod variodriver » 20 pro 2017, 12:44

Takze je mozne ze jsi pri uploadovani na server ztratil formatovani
Obrázek
ObrázekObrázek


Zpět na „Minecraft, Tekkit“

Kdo je online

Uživatelé prohlížející si toto fórum: Žádní registrovaní uživatelé a 41 hostů