Solved Something is wrong, but I don't know what..

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Cupex

Member
Feb 16, 2020
43
1
8
26
That worked yesterday. After I downloaded the latest 1.18.2 paper version to the server today, not anymore. But why?

Code:
command /repair:
    permission: flowmc.repair
    permission message: {@F}
    trigger:
        if player's tool is any pickaxe, axe, shovel, hoe, armor, bow, crossbow, shield, trident, flint and steel, fishing rod, shears or sword:
            if player's tool's durability > 0:
                set {_d} to durability of player's tool
                if type of player's tool is diamond tool:
                    set {_pMP} to 0.5*{_d}
                if type of player's tool is netherite tool:
                    set {_pMP} to 0.8*{_d}
                if type of player's tool is gold tool:
                    set {_pMP} to 0.3*{_d}
                if type of player's tool is iron tool:
                    set {_pMP} to 0.25*{_d}
                if type of player's tool is stone tool:
                    set {_pMP} to 0.10*{_d}
                if type of player's tool is wooden tool:
                    set {_pMP} to 0.05*{_d}
                if player's tool is a bow, crossbow, shears, fishing rod, flint and steel, trident or shield:
                    set {_pMP} to 0.13*{_d}
                if player's balance is more or equal to {_pMP}:
                    remove {_pMP} from player's balance
                    repair player's tool
                    send "{@P}&7Du hast das Tool erfolgreich für &a%{_pMP}%$ &7repariert." to player
                    play sound "block.anvil.use" with volume 2 and pitch 1 to player
                else:
                    send "{@P}&cDu hast nicht genug Geld um dieses Tool zu reparieren. &8(&cDir fehlen %{_pMP}-player's balance%$&8)" to player
                    play sound "block.chest.close" with volume 2 and pitch 0 to player
            else:
                send "{@P}Dein Tool ist nicht beschädigt." to player
                play sound "block.chest.close" with volume 2 and pitch 0 to player
        else:
            send "{@P}&cDu musst ein Tool in deiner Hand halten." to player
            play sound "block.chest.close" with volume 2 and pitch 0 to player

The error is:
Line 260: (System.sk)
Can't understand this condition: 'player's tool is any pickaxe, axe, shovel, hoe, armor, bow, crossbow, shield, trident, flint and steel, fishing rod, shears or sword'
Line: if player's tool is any pickaxe, axe, shovel, hoe, armor, bow, crossbow, shield, trident, flint and steel, fishing rod, shears or sword:

Line 288: (System.sk)
'else' has to be placed just after another 'if' or 'else if' section
line: else:

[script] Encountered 2 errors while reloading System.sk! (1492ms)
 
Status
Not open for further replies.