1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Why isn't this working?

Discussion in 'Skript' started by owwowwowo, Jan 20, 2021.

Tags:
Thread Status:
Not open for further replies.
  1. owwowwowo

    owwowwowo New Member

    Joined:
    Jan 20, 2021
    Messages:
    5
    Likes Received:
    0
    I've been working on this for 2-3 hours trying to fix it, I'm trying to make a fast biulder type bridging game.
    Code (Text):
    1. command /fastbuilder:
    2.     trigger:
    3.         execute console command "warp fastbiulder %player%"
    4.         wait 1 tick
    5.         execute console command "ci %player%"
    6.         Wait 3 ticks
    7.         Give player 192 sandstone
    8.         set {Seconds.%player%} to 0
    9.         loop 60 times:
    10.             wait 1 second
    11.             add 1 to {Seconds.%player%}
    12.         execute console command "warp hub %player%"
    13.         send "&eYou are taking too long and have been sent to the &e&lHub"
    14.        
    15.        
    16. On any move:
    17.     if block below the block below the player is 95:3:
    18.         execute console command "warp hub %player%"
    19.         send "&eYou have hit the ground and have been sent to the &e&lHub"
    20.         stop
    21.      
    22. On any move:
    23.     if block below the block below the player is 19:1:
    24.         set all sandstone in radius 50 to air
    25.         execute console command "warp hub %player%"
    26.         send "&eYou have completed the course in {Seconds.%player%} and have been sent to the &e&lHub"
    27.         stop
    28.  
     
  2. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    6
    May you send me errors if there are any ?
     
  3. owwowwowo

    owwowwowo New Member

    Joined:
    Jan 20, 2021
    Messages:
    5
    Likes Received:
    0
    Code (Text):
    1. [12:14:26 INFO]: [Skript] Reloading the config and all scripts...
    2. [12:14:26 INFO]: Loaded a total of 11504 english aliases
    3. [12:14:26 WARN]: There are no aliases defined for the following ids: 165, 166, 167, 168, 169, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 409, 410, 411, 412, 413, 414, 415, 416, 423, 424, 425, 427, 428, 429, 430, 431
    4. [12:14:26 ERROR]: indentation error: expected 2 tabs, but found 8 spaces (fastbulder.sk, line 4: Wait 3 ticks')
    5. [12:14:26 ERROR]: indentation error: expected 2 tabs, but found 8 spaces (fastbulder.sk, line 6: set {Seconds.%player%} to 0')
    6. [12:14:26 ERROR]: indentation error: expected 2 tabs, but found 8 spaces (fastbulder.sk, line 7: loop 60 times:')
    7. [12:14:26 ERROR]: indentation error: expected 2 tabs, but found '________->' [-> = tab, _ = space, ? = other whitespace] (fastbulder.sk, line 8: wait 1 second')
    8. [12:14:26 ERROR]: indentation error: expected 2 tabs, but found '________->' [-> = tab, _ = space, ? = other whitespace] (fastbulder.sk, line 9: add 1 to {Seconds.%player%}')
    9. [12:14:26 ERROR]: indentation error: expected 2 tabs, but found 8 spaces (fastbulder.sk, line 10: execute console command "warp hub %player%"')
    10. [12:14:26 ERROR]: indentation error: expected 2 tabs, but found 8 spaces (fastbulder.sk, line 11: send "&eYou are taking too long and have been sent to the &e&lHub"')
    11. [12:14:26 ERROR]: indentation error: expected 8 spaces, but found '____->' [-> = tab, _ = space, ? = other whitespace] (fastbulder.sk, line 23: set all sandstone in radius 50 to air')
    12. [12:14:26 WARN]: Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '95:3' with e.g. 'locked chest:3'. (fastbulder.sk, line 15: if block below the block below the player is 95:3:')
    13. [12:14:26 WARN]: Using an ID instead of an alias is discouraged and will likely not be supported in future versions of Skript anymore. Please replace '19:1' with e.g. 'sponge:1'. (fastbulder.sk, line 22: if block below the block below the player is 19:1:')
    14. [12:14:26 INFO]: Loaded 1 script with a total of 2 triggers and 1 command in 0.03 seconds
    15. [12:14:26 INFO]: [Skript] Encountered 8 errors while reloading the config and all scripts!
    16.  
     
  4. BadName

    BadName Member

    Joined:
    Oct 23, 2020
    Messages:
    23
    Likes Received:
    0
    you spelled builder wrong on line 3, I suggest using the block name instead of the ID, 19:1 is wet sponge, 95:3 is light blue stained glass. After each match you should put a 'clear {Seconds.%player%}'
     
    #4 BadName, Jan 21, 2021
    Last edited: Jan 21, 2021
  5. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    6
    code is on its way bc i understood everythinnnnnggg
    ur not using tabs correctly, i like to use spaces but it is up to you.
    Code (Text):
    1. command /fastbuilder:
    2.   trigger:
    3.     execute player command "warp fastbiulder"
    4.     wait 1 tick
    5.     execute console command "ci %player%"
    6.     Wait 3 ticks
    7.     Give player 192 sandstone
    8.     set {Seconds.%player%} to 0
    9.     loop 60 times:
    10.       wait 1 second
    11.       Add 1 to {Seconds.%player%}
    12.     execute player command "warp hub"
    13.     send "&eYou are taking too long and have been sent to the &e&lHub"
    14.    
    15.    
    16. On any movement:
    17.   if block below the block below the player is blue stained glass:
    18.     execute player command "warp hub"
    19.     send "&eYou have hit the ground and have been sent to the &e&lHub"
    20.     stop
    21.  
    22. On any movement:
    23.   if block below the block below the player is sponge:1:
    24.     set {air} to air
    25.     loop all blocks in radius 50 around player:
    26.       loop-block is sandstone
    27.       set loop-block to {air}
    28.     execute player command "warp hub"
    29.     send "&eYou have completed the course in %{Seconds.%player%}% and have been sent to the &e&lHub"
    30.     stop
    31.  
    32.  
    33.  
    im warning u now, if this code is laggy then its bc u used on any movement. Also, in line 29, if you plan to send the status of the variable to a player, you need to use %% around the variable.

    another thing, if ur not sure about a block's ID just type it in and script will find the block id that you NEED to use in the errors. If it says add it to aliases.sk, just type there for example: "Golden apple = <id of golden apple, e.g 322>" if you type there 311 instead of 322, golden apple will now be a diamond chestplate

    i hope i helped you
     
  6. TehCheetah

    TehCheetah Member

    Joined:
    Feb 7, 2021
    Messages:
    49
    Likes Received:
    1
    There a few things wrong here that I have personally noticed.

    - You spelled builder wrong on line 3
    - Using ID's for blocks don't always work I've noticed.
    - Instead of capitalizing On in "On any movement" try making it lowercase!

    For a list of ID's for the blocks, click here: https://minecraft-ids.grahamedgecombe.com/


    I hoped this helped; Have a good day!
     
  7. Turb032

    Turb032 Active Member

    Joined:
    Jan 16, 2020
    Messages:
    109
    Likes Received:
    0
    Dude you are just using spaces or tabs wrong... It's that easy, nothing else
    --- Double Post Merged, Feb 7, 2021, Original Post Date: Feb 7, 2021 ---
    OH and you can't use ids anymore
     
Thread Status:
Not open for further replies.

Share This Page

Loading...