Skocz do zawartości
  • 0

Nie działający skrypt na rangi


stasio88

Pytanie

Oto skrypt:

options:#Światyworld1: 1world2: 2world3: 3world4: 4 #Rangiwrank1: G-FBwrank2: G-Pvpwrank3: G-Crywrank4: G-Test every 3 second:	loop all players:		if loop-player's world is "{@world1}":			if loop-players doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				execute console command "/pex user %loop-players% group add {@wrank1}"every 3 second:	loop all players:		if loop-player's world is "{@world1}":			if loop-players doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				execute console command "/pex user %loop-players% group add {@wrank2}"every 3 second:	loop all players:		if loop-player's world is "{@world1}":			if loop-players doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				execute console command "/pex user %loop-players% group add {@wrank3}"every 3 second:	loop all players:		if loop-player's world is "{@world1}":			if loop-players doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				execute console command "/pex user %loop-players% group add {@wrank4}"

A oto błąd:

[19:14:43 WARN]: [Skript] Empty configuration section! You might want to indentone or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (naprawiamy.sk, line 1: 'options:')[19:14:43 ERROR]: [Skript] invalid line - all code has to be put into triggers (naprawiamy.sk, line 3: 'world1: 1')[19:14:43 ERROR]: [Skript] invalid line - all code has to be put into triggers (naprawiamy.sk, line 4: 'world2: 2')[19:14:43 ERROR]: [Skript] invalid line - all code has to be put into triggers (naprawiamy.sk, line 5: 'world3: 3')[19:14:43 ERROR]: [Skript] invalid line - all code has to be put into triggers (naprawiamy.sk, line 6: 'world4: 4')[19:14:43 ERROR]: [Skript] invalid line - all code has to be put into triggers (naprawiamy.sk, line 9: 'wrank1: G-FB')[19:14:43 ERROR]: [Skript] invalid line - all code has to be put into triggers (naprawiamy.sk, line 10: 'wrank2: G-Pvp')[19:14:43 ERROR]: [Skript] invalid line - all code has to be put into triggers (naprawiamy.sk, line 11: 'wrank3: G-Cry')[19:14:43 ERROR]: [Skript] invalid line - all code has to be put into triggers (naprawiamy.sk, line 12: 'wrank4: G-Test')[19:14:43 ERROR]: [Skript] undefined option {@world1} (naprawiamy.sk, line 16: 'if loop-player's world is "{@world1}":')[19:14:43 ERROR]: [Skript] undefined option {@world1} (naprawiamy.sk, line 21: 'if loop-player's world is "{@world1}":')[19:14:43 ERROR]: [Skript] undefined option {@world1} (naprawiamy.sk, line 26: 'if loop-player's world is "{@world1}":')[19:14:43 ERROR]: [Skript] undefined option {@world1} (naprawiamy.sk, line 31: 'if loop-player's world is "{@world1}":')[19:14:43 INFO]: [Skript] loaded 1 script with a total of 4 triggers and 0 commands in 0.31 seconds[19:14:43 INFO]: [Skript] Skript finished loading![19:14:44 INFO]: [Skript] You're currently running the latest stable version ofSkript.

Wie ktoś może jak to naprawic? Jest mi to bardzo potrzebne...

Odnośnik do komentarza
Udostępnij na innych stronach

11 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Po wytabowaniu, zdjęciu sobie op'a skrypt nadaje mi cały czas wszystkie rangi, oto log z konsoli:

[11:04:05 INFO]: User added to group "G-FB"![11:04:05 INFO]: User added to group "G-Pvp"![11:04:05 INFO]: User added to group "G-Cry"![11:04:05 INFO]: User added to group "nowy"![11:04:08 INFO]: User added to group "nowy"![11:04:08 INFO]: User added to group "G-FB"![11:04:08 INFO]: User added to group "G-Pvp"![11:04:08 INFO]: User added to group "G-Cry"![11:04:12 INFO]: User added to group "G-Cry"![11:04:12 INFO]: User added to group "nowy"![11:04:12 INFO]: User added to group "G-FB"![11:04:12 INFO]: User added to group "G-Pvp"![11:04:15 INFO]: User added to group "G-FB"![11:04:15 INFO]: User added to group "G-Pvp"![11:04:15 INFO]: User added to group "nowy"![11:04:15 INFO]: User added to group "G-Cry"![11:04:18 INFO]: User added to group "G-Cry"![11:04:18 INFO]: User added to group "G-FB"![11:04:18 INFO]: User added to group "G-Pvp"![11:04:18 INFO]: User added to group "nowy"!
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
every 3 seconds:	loop all players:		if loop-player's world is "{@world1}":			if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				execute console command "/pex user %loop-player% group add {@wrank1}"		if loop-player's world is "{@world2}":			if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				execute console command "/pex user %loop-player% group add {@wrank2}"		if loop-player's world is "{@world3}":			if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				execute console command "/pex user %loop-player% group add {@wrank3}"		if loop-player's world is "{@world4}":			if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				execute console command "/pex user %loop-player% group add {@wrank4}"

Usunąłem 3 zbędne zdarzenia, 3 zaplętlania. Poprawiłem sprawdzanie czy zapętlony gracz nie ma uprawnień (wcześniej sprawdzało czy wczyscy nie mają). Poprawiłem także zmienną %loop-players% na %loop-player% oraz nazwy opcji dotyczące światów.

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
every 3 seconds:	loop all players:		if loop-player's world is "{@world1}":			if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				execute console command "/pex user %loop-player% group add {@wrank1}"		if loop-player's world is "{@world2}":			if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				execute console command "/pex user %loop-player% group add {@wrank2}"		if loop-player's world is "{@world3}":			if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				execute console command "/pex user %loop-player% group add {@wrank3}"		if loop-player's world is "{@world4}":			if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				execute console command "/pex user %loop-player% group add {@wrank4}"

Usunąłem 3 zbędne zdarzenia, 3 zaplętlania. Poprawiłem sprawdzanie czy zapętlony gracz nie ma uprawnień (wcześniej sprawdzało czy wczyscy nie mają). Poprawiłem także zmienną %loop-players% na %loop-player% oraz nazwy opcji dotyczące światów.

 

To nic nie dało...

 

Nowy log w konsoli:

[18:48:51 INFO]: User added to group "G-FB"![18:48:55 INFO]: User added to group "G-FB"![18:48:58 INFO]: User added to group "G-FB"![18:49:00 INFO]: [1]<[FB]Stasio88> :D[18:49:01 INFO]: User added to group "G-FB"![18:49:03 INFO]: User added to group "G-FB"!

Jak widac, mam juz rangę G-FB i cały czas skrypt mi ją nadaje..

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

jest to bug zwiazany z tym ze jestes ciagle w danym swiecie.Jesli jestes w swiecie 1 to co 3 sekundy bedzie nadawac ci range G-FB.] Na poczatku skryptu dodaj to:

variables:     {fb.%player%} = 0
a to w kodzie (zrob kopie starego kodu, bo moze byc cos zle)musisz dokladnie to wytabowac bo nie testowalem :D
every 3 seconds:	loop all players:		if loop-player's world is "{@world1}": 			if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":                                if {fb.%player%} is 0: 	                            execute console command "/pex user %loop-player% group add {@wrank1}"                                        set {fb.%player%} to fb
i tak z innymi swiatami ...musisz tworzyc tez nowe zmienne dla nowych swiatow (takie same ja zmienna fb tylko zmieniaj nazwy) ...I przy kazdym nowym swiecie musisz dodac to:
set {nazwa zmiennej.%player%} to 0:
tyle razy ile masz swiatow odejmujac swiat w ktorym ma byc dany PREFIX gracza Przyklad:Gdy mamy 3 swiaty np.pvp, hns, fb
every 3 seconds:	loop all players:		if loop-player's world is "{@world1}":                        set {pvp.%player%} to 0:                            set {hns.%player%} to 0: 			        if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":                                    if {fb.%player%} is 0: 	                                execute console command "/pex user %loop-player% group add {@wrank1}":                                            set {fb.%player%} to fb
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

 

jest to bug zwiazany z tym ze jestes ciagle w danym swiecie.

Jesli jestes w swiecie 1 to co 3 sekundy bedzie nadawac ci range G-FB.]

 

Na poczatku skryptu dodaj to:

variables:     {fb.%player%} = 0

a to w kodzie (zrob kopie starego kodu, bo moze byc cos zle)

musisz dokladnie to wytabowac bo nie testowalem :D

every 3 seconds:	loop all players:		if loop-player's world is "{@world1}": 			if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":                                if {fb.%player%} is 0: 	                            execute console command "/pex user %loop-player% group add {@wrank1}"                                        set {fb.%player%} to fb

i tak z innymi swiatami ...

musisz tworzyc tez nowe zmienne dla nowych swiatow (takie same ja zmienna fb tylko zmieniaj nazwy) ...

I przy kazdym nowym swiecie musisz dodac to:

set {nazwa zmiennej.%player%} to 0:

tyle razy ile masz swiatow odejmujac swiat w ktorym ma byc dany PREFIX gracza

 

Przyklad:

Gdy mamy 3 swiaty np.

pvp, hns, fb

every 3 seconds:	loop all players:		if loop-player's world is "{@world1}":                        set {pvp.%player%} to 0:                            set {hns.%player%} to 0: 			        if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":                                    if {fb.%player%} is 0: 	                                execute console command "/pex user %loop-player% group add {@wrank1}":                                            set {fb.%player%} to fb

 

Nadal błąd...

[07:13:10 INFO]: User added to group "G-FB"![07:13:14 INFO]: User added to group "G-FB"![07:13:17 INFO]: User added to group "G-FB"![07:13:20 INFO]: User added to group "G-FB"![07:13:21 INFO]: [1]<[FB]Stasio88> :/[07:13:23 INFO]: User added to group "G-FB"!

+ Daje mi tylko rangę na świecie do FreeBuilda, a do innych nie..

variables:	{fb.%player%} = false	{pvp.%player%} = false	{cry.%player%} = falseoptions:#Światy	world1: 1	world2: 2	world3: 3	world4: world #Rangi	wrank1: G-FB	wrank2: G-Pvp	wrank3: G-Cry	wrank4: nowy every 3 seconds:	loop all players:		if loop-player's world is "{@world1}":			if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				if {fb.%player%} is "false":					execute console command "/pex user %loop-player% group add {@wrank1}"					set {fb.%player%} to "true"		if loop-player's world is "{@world2}":			if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				if {pvp.%player%} is "false":					execute console command "/pex user %loop-player% group add {@wrank2}"					set {Pvp.%player%} to "true"		if loop-player's world is "{@world3}":			if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				execute console command "/pex user %loop-player% group add {@wrank3}"		if loop-player's world is "{@world4}":			if loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator":				execute console command "/pex user %loop-player% group add {@wrank4}"

Tak wygląda skrypt

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Jak dla mnie, to poniżej powinno działać

options:#Światy    world1: 1    world2: 2    world3: 3    world4: 4#Rangi    wrank1: G-FB    wrank2: G-Pvp    wrank3: G-Cry    wrank4: G-Testvariables:    ranga.%player% = ""every 3 seconds:    loop all players:        if loop-player's world is "{@world1}":            {ranga.%loop-player%} isn't "{@wrank1}"            loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator"            execute console command "/pex user %loop-players% group add {@wrank1}"            set {ranga.%loop-player%} to "{@wrank1}"        else if loop-player's world is "{@world2}":            {ranga.%loop-player%} isn't "{@wrank2}"            loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator"            execute console command "/pex user %loop-players% group add {@wrank2}"            set {ranga.%loop-player%} to "{@wrank2}"        else if loop-player's world is "{@world3}":            {ranga.%loop-player%} isn't "{@wrank3}"            loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator"            execute console command "/pex user %loop-players% group add {@wrank3}"            set {ranga.%loop-player%} to "{@wrank3}"        else if loop-player's world is "{@world4}":            {ranga.%loop-player%} isn't "{@wrank4}"            loop-player doesn't have permission "vip" or "Wlasciciel" or "Admin" or "Moderator"            execute console command "/pex user %loop-players% group add {@wrank4}"            set {ranga.%loop-player%} to "{@wrank4}"
Odnośnik do komentarza
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ę...