Solved Satchel (Raiding Item)

  • 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 community!

    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.

CringeBoy

Active Member
May 20, 2021
65
0
6
Romania
Code:
on place of wood button:
  block at event-location
  wait 150 tick
  create an explosion of force 1
  loop blocks in radius 2 around event-location:
    add 1 to {explosiondurability::%loop-block%}
    if loop-block is plank:
      if  {explosiondurability::%loop-block%} is more than or equal to 3:
      break loop-block naturally
    if loop-block is cobblestone:
      if  {explosiondurability::%loop-block%} is more than or equal to 10:
      break loop-block naturally
It was supposed to break planks with 3 satchels and cobblestone with 10 satchels and also disappear after explosion, but it breaks everything with just 1 satchel.
 
you want to place 4 more spaces on your break loop-block lines to place them in the if statement.

right now, they are on your "if loop block id plank" -> break

also, you could have kept this in your previous thread, as it is basically the same code you copied from Minecoll_YT
 
Last edited:
yes...
the spaces are important for skript as it doesn't use the {} brackets the way most programming languages would use them.

you need to line them up properly with spaces.
you have two empty IF statements in the code you posted, and it should have given you a warning in your server console.
nV3mGkv.png
 
yes...
the spaces are important for skript as it doesn't use the {} brackets the way most programming languages would use them.

you need to line them up properly with spaces.
you have two empty IF statements in the code you posted, and it should have given you a warning in your server console.
nV3mGkv.png
Code:
[WARNING] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (satchel.sk, line 8: if {explosiondurability::%loop-block%} is more than or equal to 3:')

[WARNING] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (satchel.sk, line 11: if {explosiondurability::%loop-block%} is more than or equal to 10:')

[ERROR] Can't understand this condition/effect: block at event-location (satchel.sk, line 2: block at event-location')
I am having these warnings and 1 error
 
Code:
[WARNING] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (satchel.sk, line 8: if {explosiondurability::%loop-block%} is more than or equal to 3:')

[WARNING] Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (satchel.sk, line 11: if {explosiondurability::%loop-block%} is more than or equal to 10:')

[ERROR] Can't understand this condition/effect: block at event-location (satchel.sk, line 2: block at event-location')
I am having these warnings and 1 error
yes, like i said. fix them the way i told you to.
the error is from the 2nd line. and tbh, i dont know what that line is supposed to do either. so just comment it out.
place 4 extra spaces on the lines under your IF statements that are empty right now.
 
yes, like i said. fix them the way i told you to.
the error is from the 2nd line. and tbh, i dont know what that line is supposed to do either. so just comment it out.
place 4 extra spaces on the lines under your IF statements that are empty right now.
But I've still got the problem with the satchels. They are breaking the plank instanly instead of using 3 satchels, and on cobblestone instantly instead of using 10
[doublepost=1621775140,1621774520][/doublepost]Nevermind. I just fixed the problem. Thank you for your time!
 
Status
Not open for further replies.