Error

Discussion in 'Skript' started by Vicen621, Jul 29, 2020.

  1. Help, When I reload the script give me an error and I cant solve it.
    Code (Text):
    On consume:
        if item is golden apple named "&6Golden Head":
            apply regeneration of tier 2 to player for 10 seconds
            apply absorption of tier 1 to player for 120 seconds
        else if item is golden apple:
            apply regeneration of tier 2 to player for 4 seconds
            apply absorption of tier 1 to player for 120 seconds
    Error:
    Code (Text):
    Indentation error: expected 2 tabs, but found 8 spaces (Goldenretriever.sk, line 3: apply regeneration of tier 2 to player for 10 seconds)

    Indentation error: expected 2 tabs, but found 8 spaces (Goldenretriever.sk, line 4: apply absorption of tier 1 to player for 120 seconds)

    Indentation error: expected 2 tabs, but found 4 spaces (Goldenretriever.sk, line 5:  else if item is golden apple:)

    Indentation error: expected 2 tabs, but found 8 spaces (Goldenretriever.sk, line 6: apply regeneration of tier 2 to player for 4 seconds)
     
  2. Remove all spaces, insert tab instead of them. or change line 2's tab with space.
    Code (Text):
    On consume:
        if item is golden apple named "&6Golden Head":
            apply regeneration of tier 2 to player for 10 seconds
            apply absorption of tier 1 to player for 120 seconds
        else if item is golden apple:
            apply regeneration of tier 2 to player for 4 seconds
            apply absorption of tier 1 to player for 120 seconds
     
  3. If you plan on using spaces on your scripts, you have to use spaces (2 spaces = 1 indentation) or you can use a tab. Nothing will work if you have both tabs and spaces
     
  4. Yes, I try this, but when I change the space for tabs it says, expected 8 spaces but found 2 tabs
     
  5. then whatever line has spaces has to be changed to tabs
     
  6. You can also use a text editor program such as Notepad++ or TextEdit !!! :)