Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Problem ze skryptem


Rekomendowane odpowiedzi

Opublikowano

Mam problem ze skryptem na /baza i /spawn. Nie działają mi permisje. Mógłby ktoś na to spojrzeć? W skrypcie chodzi o to, by gracze w zależności od permisji mogli teleportować się po bazach. Skrypt i errory wrzucam poniżej. 

 

Skrypt:

command /ustawbazefundacja:
    usage: /ustawbazefundacja
    trigger:
    if player has permission "securecraft.ustawbaze":
        set {baza-fundacja} to location of player
        send "&bUstawiono teleport do Głównego &cOśrodka Fundacji&b!"
    else:
        send "&cNie masz permisji!"
           
command /ustawbazedywizja:
    usage: /ustawbazedywizja
    trigger:
        if player has permission "securecraft.ustawbaze":
            set {baza-dywizja} to location of player
            send "&bUstawiono teleport do Głównej Siedziby &cGRU "Dywizji" P&b!"
        else:
            send "&cNie masz permisji!"
    
command /ustawbazearmia:
    usage: /ustawbazearmia
    trigger:
        if player has permission "securecraft.ustawbaze":
            set {baza-armia} to location of player
            send "&bUstawiono teleport do Kryjówki &cSamozwańczej Armii&b!"
        else:
            send "&cNie masz permisji!"
           
command /baza:
    usage: /baza
    trigger:
        set {baza-delay} to 5
        send "&bPoczekaj &c5 sekund&b!"
        while {baza-delay} > 0:
            set {_loc} to location of player                  
            wait 1 second
            remove 1 from {baza-delay}
            send "&c%{hub-delay} + 1%..."
            set {_loccheck} to location of player
            if {_loc} is {_loccheck}:
            if {baza-delay} < 1:
            if player has permission "securecraft.fundacja"
                teleport player to {baza-fundacja}
                send "&bWitaj w &cOśrodku Głównym Fundacji&b!"
                stop
            if player has permission "securecraft.dywizja"
                teleport player to {baza-dywizja}
                send "&bWitaj w &cSiedzibie Głównej GRU 'Dywizji' P&b!"
                stop
            if player has permission "securecraft.armia"
                teleport player to {baza-armia}
                send "&bWitaj w &cKryjówce Samozwańczej Armii&b!"
                stop
            else:
                send "&cNie należysz do żadnej organizacji, więc nie posiadasz bazy!"
                stop
            else:
                send "&cPoruszyłeś się! Przerwano teleport!"
                stop

command /ustawspawn:
    usage: /ustawspawn
    trigger:
        if player has permission "securecraft.ustawbaze":
            set {spawn} to location of player
            send "&bUstawiono spawn!"
        else:
            send "&cNie masz permisji!"

command /spawn:
    usage: /spawn
    trigger:
        set {spawn-delay} to 5
        send "&bPoczekaj &c5 sekund&b!"
        while {spawn-delay} > 0:
            set {_loc} to location of player                  
            wait 1 second
            remove 1 from {spawn-delay}
            send "&c%{spawn-delay} + 1%..."
            set {_loccheck} to location of player
            if {_loc} is {_loccheck}:
                if {baza-delay} < 1:
                    teleport player to {spawn}
                    send "&bGotowe!"
                    stop           
            else:
                send "&cPoruszyłeś się! Przerwano teleport!"
                stop

 

Błędy:

[15:42:09 ERROR]: [Skript] indentation error: expected 3 tabs, but found 4 tabs (securecraft-test.sk, line 42: teleport player to {baza-fundacja}')
[15:42:09 ERROR]: [Skript] indentation error: expected 3 tabs, but found 4 tabs (securecraft-test.sk, line 43: send "&bWitaj w &cOśrodku Głównym Fundacji&b!"')
[15:42:09 ERROR]: [Skript] indentation error: expected 3 tabs, but found 4 tabs (securecraft-test.sk, line 44: stop')
[15:42:09 ERROR]: [Skript] indentation error: expected 3 tabs, but found 4 tabs (securecraft-test.sk, line 46: teleport player to {baza-dywizja}')
[15:42:09 ERROR]: [Skript] indentation error: expected 3 tabs, but found 4 tabs (securecraft-test.sk, line 47: send "&bWitaj w &cSiedzibie Głównej GRU 'Dywizji' P&b!"')
[15:42:09 ERROR]: [Skript] indentation error: expected 3 tabs, but found 4 tabs (securecraft-test.sk, line 48: stop')
[15:42:09 ERROR]: [Skript] indentation error: expected 3 tabs, but found 4 tabs (securecraft-test.sk, line 50: teleport player to {baza-armia}')
[15:42:09 ERROR]: [Skript] indentation error: expected 3 tabs, but found 4 tabs (securecraft-test.sk, line 51: send "&bWitaj w &cKryjówce Samozwańczej Armii&b!"')
[15:42:09 ERROR]: [Skript] indentation error: expected 3 tabs, but found 4 tabs (securecraft-test.sk, line 52: stop')
[15:42:09 ERROR]: [Skript] Unexpected entry 'if player has permission "securecraft.ustawbaze"'. Check whether it's spelled correctly or remove it. (securecraft-test.sk, line 4: if player has permission "securecraft.ustawbaze":')
[15:42:09 ERROR]: [Skript] Unexpected entry 'else'. Check whether it's spelled correctly or remove it. (securecraft-test.sk, line 7: else:')
[15:42:09 ERROR]: [Skript] Can't understand this condition/effect: send "&bUstawiono teleport do Głównej Siedziby &cGRU "Dywizji" P&b!" (securecraft-test.sk, line 15: send "&bUstawiono teleport do Głównej Siedziby &cGRU "Dywizji" P&b!"')
[15:42:09 ERROR]: [Skript] Can't understand this condition/effect: if player has permission "securecraft.fundacja" (securecraft-test.sk, line 41: if player has permission "securecraft.fundacja"')
[15:42:09 ERROR]: [Skript] Can't understand this condition/effect: if player has permission "securecraft.dywizja" (securecraft-test.sk, line 45: if player has permission "securecraft.dywizja"')
[15:42:09 ERROR]: [Skript] Can't understand this condition/effect: if player has permission "securecraft.armia" (securecraft-test.sk, line 49: if player has permission "securecraft.armia"')
[15:42:09 ERROR]: [Skript] 'else' has to be placed just after an 'if' or 'else if' section (securecraft-test.sk, line 56: else:')

Opublikowano
Dnia 1.05.2020 o 19:30, Cojamamtuwpisac napisał:

Problem jest z linijkami "if player has permission "securecraft.fundacja""
popraw je dodając do nich na koncu dwukropek
Zawsze jeśli jest dwukropek to następna linia ma 1 tab więcej 

Jeśli ci pomogłem to daj lajka ❤️ 

 

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...