All code has to be put into triggers

  • 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.

Herieman

New Member
Jun 21, 2017
5
0
0
30
I might very well be extremely stupid because i just can't seem to fix this issue.
Though i do understand the errors around the spaces, that is an easy fix, the one i keep getting back on is:
'all code has to be put into triggers'

Relatively new to skript so i am sorry if this is a dumb question.

Skript Version: Skript 2.2 (dev28c)
Skript Author: Bensku
Minecraft Version: 1.11.2
---
Full Code:
code_language.skript:
options:
    VersionID: 1

on rightclick
if target block is crafting table
if block above is anvil
    open chest with 1 rows named "&4Deconstructor" to player
        format slot 0 of player with gold ingot named "Test 1" to close then run "This is a test item to see if this works"
        format slot 1 of player with fire named "Close Menu" with lore "I will close this menu.||Nothing more, nothing less." to close
        format slot 2 of player with gold ingot to run [broadcast "Just Testing"]
        format slot 3 of player with gold ingot named "Test 1" to check if player has 1 iron ingot then run "This is a test item to see if this works" then remove 1 iron ingot from the player then give a diamond pickaxe of efficiency 5 to the player

Errors on Reload:

code_language.skript:
21.06 11:31:00 [Server] ERROR indentation error: expected 0 spaces, but found 8 spaces (Deconstructor.sk, line 9: format slot 1 of player with fire named "Close Menu" with lore "I will close this menu.||Nothing more, nothing less." to close') 
21.06 11:31:00 [Server] ERROR indentation error: expected 0 spaces, but found 8 spaces (Deconstructor.sk, line 10: format slot 2 of player with gold ingot to run [broadcast "Just Testing"]') 
21.06 11:31:00 [Server] ERROR indentation error: expected 0 spaces, but found 8 spaces (Deconstructor.sk, line 11: format slot 3 of player with gold ingot named "Test 1" to check if player has 1 iron ingot then run "This is a test item to see if this works" then remove 1 iron ingot from the player then give a diamond pickaxe of efficiency 5 to the player') 
21.06 11:31:00 [Server] ERROR invalid line - all code has to be put into triggers (Deconstructor.sk, line 4: on rightclick') 
21.06 11:31:00 [Server] ERROR invalid line - all code has to be put into triggers (Deconstructor.sk, line 5: if target block is crafting table') 
21.06 11:31:00 [Server] ERROR invalid line - all code has to be put into triggers (Deconstructor.sk, line 6: if block above is anvil') 
21.06 11:31:00 [Server] INFO Loaded 1 script with a total of 0 triggers and 0 commands in 0 seconds 
21.06 11:31:00 [Server] INFO Encountered 8 errors while reloading all scripts!

Addons using (including versions):
None

Troubleshooting:

Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? I have tested a lot of things people mentioned on the forums and i actually downloaded a few skripts to see if i could copy parts of it but none of it seems to work.
 
Are you new in skript?

you forget a lot ":"

Yes i am new to Skript.
Do you mean that i should put : in the code like.. this?

code_language.skript:
options:
    VersionID: 1
 
on rightclick:
if target block is crafting table:
if block above is anvil:
    open chest with 1 rows named "&4Deconstructor" to player:
        format slot 0 of player with gold ingot named "Test 1" to close then run "This is a test item to see if this works"
        format slot 1 of player with fire named "Close Menu" with lore "I will close this menu.||Nothing more, nothing less." to close
        format slot 2 of player with gold ingot to run [broadcast "Just Testing"]
        format slot 3 of player with gold ingot named "Test 1" to check if player has 1 iron ingot then run "This is a test item to see if this works" then remove 1 iron ingot from the player then give a diamond pickaxe of efficiency 5 to the player
 
Yes... Now... you enter ":" so its mean you need add 4 space or 1 TAB.

code_language.skript:
on rightclick:
    if target block is crafting table:
        if block above is anvil:
            open chest with 1 rows named "&4Deconstructor" to player
            format slot 0 of player with gold ingot named "Test 1" to close then run "This is a test item to see if this works"
            format slot 1 of player with fire named "Close Menu" with lore "I will close this menu.||Nothing more, nothing less." to close
            format slot 2 of player with gold ingot to run [broadcast "Just Testing"]
            format slot 3 of player with gold ingot named "Test 1" to check if player has 1 iron ingot then run "This is a test item to see if this works" then remove 1 iron ingot from the player then give a diamond pickaxe of efficiency 5 to the player

like this
 
I see, i have done that but i got a few new errors:

code_language.skript:
options:
    VersionID: 1

on rightclick:
    if target block is crafting table:
        if block above is anvil:
            open chest with 1 rows named "&4Deconstructor" to player
            format slot 0 of player with gold ingot named "Test 1" to close then run "This is a test item to see if this works"
            format slot 1 of player with fire named "Close Menu" with lore "I will close this menu.||Nothing more, nothing less." to close
            format slot 2 of player with gold ingot to run [broadcast "Just Testing"]
            format slot 3 of player with gold ingot named "Test 1" to check if player has 1 iron ingot then run "This is a test item to see if this works" then remove 1 iron ingot from the player then give a diamond pickaxe of efficiency 5 to the player

code_language.skript:
21.06 12:45:28 [Server] ERROR Can't understand this condition/effect: open chest with 1 rows named "&4Deconstructor" to player (Deconstructor.sk, line 7: open chest with 1 rows named "&4Deconstructor" to player')
21.06 12:45:28 [Server] ERROR Can't understand this condition/effect: format slot 0 of player with gold ingot named "Test 1" to close then run "This is a test item to see if this works" (Deconstructor.sk, line 8: format slot 0 of player with gold ingot named "Test 1" to close then run "This is a test item to see if this works"')
21.06 12:45:28 [Server] ERROR Can't understand this condition/effect: format slot 1 of player with fire named "Close Menu" with lore "I will close this menu.||Nothing more, nothing less." to close (Deconstructor.sk, line 9: format slot 1 of player with fire named "Close Menu" with lore "I will close this menu.||Nothing more, nothing less." to close')
21.06 12:45:28 [Server] ERROR Can't understand this condition/effect: format slot 2 of player with gold ingot to run [broadcast "Just Testing"] (Deconstructor.sk, line 10: format slot 2 of player with gold ingot to run [broadcast "Just Testing"]')
21.06 12:45:28 [Server] ERROR Can't understand this condition/effect: format slot 3 of player with gold ingot named "Test 1" to check if player has 1 iron ingot then run "This is a test item to see if this works" then remove 1 iron ingot from the player then give a diamond pickaxe of efficiency 5 to the player (Deconstructor.sk, line 11: format slot 3 of player with gold ingot named "Test 1" to check if player has 1 iron ingot then run "This is a test item to see if this works" then remove 1 iron ingot from the player then give a diamond pickaxe of efficiency 5 to the player')
21.06 12:45:28 [Server] INFO Loaded 1 script with a total of 1 trigger and 0 commands in 0.11 seconds
21.06 12:45:28 [Server] INFO Encountered 5 errors while reloading all scripts!
 
Status
Not open for further replies.