Skocz do zawartości
  • 1

Skarbonka do lekkiego przerobienia! Help!


Pytanie

Przerobi ktoś tak, aby, gdy mam w skarbonce 1 zł, a wpiszę /skarbonkausun mojnick 2 to zeby pokazywalo "&cBrak srodkow na koncie! Dodaj je uzywajac &b/konto"?

 

Skrypt:

on first join:
    execute console command "/skarbonkagive %player% 0"

command /skarbonkagive [<offlineplayer>] [<text>]:
    permission: daj.zl
    permission message: &cNie ma takiej komendy
    trigger:
        if arg 1 is set:
            if arg 2 is set:
                set {_ilosc} to arg 2 parsed as number
                add {_ilosc} to {skarbonka::%arg 1%}
                send "&bWplacono %{_ilosc}% zl do skarbonki %arg 1%"
          
        else:
            send "&aPoprawne uzycie komendy: /skarbonkagive <gracz> <ilosc> "

            
        
command /skarbonkausun [<offlineplayer>] [<text>]:
    permission: usun
    permission message: &cNie ma takiej komendy
    trigger:
        if arg 1 is set:
            if arg 2 is set:
                set {_ilosc} to arg 2 parsed as number
                remove {_ilosc} from {skarbonka::%arg 1%}
                send "&bUsunieto %{_ilosc}% zl ze skarbonki %arg 1%"
          
        else:
            send "&aPoprawne uzycie komendy: /skarbonkausun <gracz> <kwota> "

Z góry dzięki :D 

Odnośnik do komentarza
https://skript.pl/temat/31833-skarbonka-do-lekkiego-przerobienia-help/
Udostępnij na innych stronach

4 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
on first join:
    execute console command "/skarbonkagive %player% 0"

command /skarbonkagive [<offlineplayer>] [<text>]:
    permission: daj.zl
    permission message: &cNie ma takiej komendy
    trigger:
        if arg 1 is set:
            if arg 2 is set:
                set {_ilosc} to arg 2 parsed as number
                add {_ilosc} to {skarbonka::%arg 1%}
                send "&bWplacono %{_ilosc}% zl do skarbonki %arg 1%"
          
        else:
            send "&aPoprawne uzycie komendy: /skarbonkagive <gracz> <ilosc> "

            
        
command /skarbonkausun [<offlineplayer>] [<text>]:
    permission: usun
    permission message: &cNie ma takiej komendy
    trigger:
        if arg 1 is set:
            if arg 2 is set:
                arg 2 =< {skarbonka::%player%}:
                  set {_ilosc} to arg 2 parsed as number
                  remove {_ilosc} from {skarbonka::%arg 1%}
                  send "&bUsunieto %{_ilosc}% zl ze skarbonki %arg 1%"
                else:
                    send "&cBrak srodkow na koncie! Dodaj je uzywajac &b/konto"
        else:
            send "&aPoprawne uzycie komendy: /skarbonkausun <gracz> <kwota> "

Zobacz czy działa

Edytowane przez pandax
Odnośnik do komentarza
https://skript.pl/temat/31833-skarbonka-do-lekkiego-przerobienia-help/#findComment-206252
Udostępnij na innych stronach

  • 0
8 minut temu, pandax napisał:

on first join:
    execute console command "/skarbonkagive %player% 0"

command /skarbonkagive [<offlineplayer>] [<text>]:
    permission: daj.zl
    permission message: &cNie ma takiej komendy
    trigger:
        if arg 1 is set:
            if arg 2 is set:
                set {_ilosc} to arg 2 parsed as number
                add {_ilosc} to {skarbonka::%arg 1%}
                send "&bWplacono %{_ilosc}% zl do skarbonki %arg 1%"
          
        else:
            send "&aPoprawne uzycie komendy: /skarbonkagive <gracz> <ilosc> "

            
        
command /skarbonkausun [<offlineplayer>] [<text>]:
    permission: usun
    permission message: &cNie ma takiej komendy
    trigger:
        if arg 1 is set:
            if arg 2 is set:
                arg 2 =< {skarbonka::%player%}:
                  set {_ilosc} to arg 2 parsed as number
                  remove {_ilosc} from {skarbonka::%arg 1%}
                  send "&bUsunieto %{_ilosc}% zl ze skarbonki %arg 1%"
                else:
                    send "&cBrak srodkow na koncie! Dodaj je uzywajac &b/konto"
        else:
            send "&aPoprawne uzycie komendy: /skarbonkausun <gracz> <kwota> "

Zobacz czy działa


 
[17:10:58 ERROR]: indentation error: expected 20 spaces, but found 18 spaces (Skarbonka.sk, line 26: set {_ilosc} to arg 2 parsed as number')
[17:10:58 ERROR]: indentation error: expected 20 spaces, but found 18 spaces (Skarbonka.sk, line 27: remove {_ilosc} from {skarbonka::%arg 1%}')
[17:10:58 ERROR]: indentation error: expected 20 spaces, but found 18 spaces (Skarbonka.sk, line 28: send "&bUsunieto %{_ilosc}% zl ze skarbonki %arg 1%"')
[17:10:58 WARN]: Empty configuration section! You might want to indent one 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. (Skarbonka.sk, line 25: arg 2 =< {skarbonka::%player%}:')
[17:10:58 ERROR]: can't understand this condition: 'arg 2 =< {skarbonka::%player%}' (Skarbonka.sk, line 25: arg 2 =< {skarbonka::%player%}:')
[17:10:58 ERROR]: 'else' has to be placed just after an 'if' or 'else if' section (Skarbonka.sk, line 29: else:')
Odnośnik do komentarza
https://skript.pl/temat/31833-skarbonka-do-lekkiego-przerobienia-help/#findComment-206253
Udostępnij na innych stronach

  • 0
47 minut temu, spadajokk napisał:


 
[17:10:58 ERROR]: indentation error: expected 20 spaces, but found 18 spaces (Skarbonka.sk, line 26: set {_ilosc} to arg 2 parsed as number')
[17:10:58 ERROR]: indentation error: expected 20 spaces, but found 18 spaces (Skarbonka.sk, line 27: remove {_ilosc} from {skarbonka::%arg 1%}')
[17:10:58 ERROR]: indentation error: expected 20 spaces, but found 18 spaces (Skarbonka.sk, line 28: send "&bUsunieto %{_ilosc}% zl ze skarbonki %arg 1%"')
[17:10:58 WARN]: Empty configuration section! You might want to indent one 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. (Skarbonka.sk, line 25: arg 2 =< {skarbonka::%player%}:')
[17:10:58 ERROR]: can't understand this condition: 'arg 2 =< {skarbonka::%player%}' (Skarbonka.sk, line 25: arg 2 =< {skarbonka::%player%}:')
[17:10:58 ERROR]: 'else' has to be placed just after an 'if' or 'else if' section (Skarbonka.sk, line 29: else:')

dodaj if do arg 2 =< {skarbonka::%player%}  i masz źle spacje, lepiej używać tabów zamiast 4 spacji

 

Prawdopodobnie osoba pisząca ten sk źle ci wytabowała a ty tylko wkleiłeś  :/ 

Edytowane przez sworip
Odnośnik do komentarza
https://skript.pl/temat/31833-skarbonka-do-lekkiego-przerobienia-help/#findComment-206260
Udostępnij na innych stronach

  • 0
on first join:
	execute console command "/skarbonkagive %player% 0"

command /skarbonkagive [<offlineplayer>] [<text>]:
	permission: daj.zl
	permission message: &cNie ma takiej komendy
	trigger:
		if arg 1 is set:
			if arg 2 is set:
				set {_ilosc} to arg 2 parsed as number
				add {_ilosc} to {skarbonka::%arg 1%}
				send "&bWplacono %{_ilosc}% zl do skarbonki %arg 1%"
		else:
			send "&aPoprawne uzycie komendy: /skarbonkagive <gracz> <ilosc> "

            
        
command /skarbonkausun [<offlineplayer>] [<text>]:
	permission: usun
	permission message: &cNie ma takiej komendy
	trigger:
		if arg 1 is set:
			if arg 2 is set:
				if arg 2 <= {skarbonka::%player%}:
					set {_ilosc} to arg 2 parsed as number
					remove {_ilosc} from {skarbonka::%arg 1%}
					send "&bUsunieto %{_ilosc}% zl ze skarbonki %arg 1%"
				else:
					send "&cBrak srodkow na koncie! Dodaj je uzywajac &b/konto"
		else:
			send "&aPoprawne uzycie komendy: /skarbonkausun <gracz> <kwota> "

wytabowane

naprawione błędy

Edytowane przez VIPEQ
Odnośnik do komentarza
https://skript.pl/temat/31833-skarbonka-do-lekkiego-przerobienia-help/#findComment-208878
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ę...