[SOLVED] Procedure Template if/elif/else

Started by FuzzyButt on

Topic category: Troubleshooting, bugs, and solutions

Last seen on 10:33, 13. Aug 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[SOLVED] Procedure Template if/elif/else
Wed, 10/20/2021 - 13:56 (edited)

Good morning!

I am hoping I am posting in the correct area.  I am trying to design an ore/ingot crusher.  It should accept either my custom ore, custom ingot, or an iron ingot and output either 2 dust from the custom ore block, 2 from the ingot, or 2 iron dust from the iron ore block.  I originally followed a youtube tutorial and do get the 'entity'  box to light up when adding it under 'On button clicked', however that was just for 1 single ore to dust.  I can not seem to figure out how to get it to do it if there are 3 different types of materials you could insert into it. I have included a screenshot of my 5th or 6th arrangement before looking and trying to find a solution on here. (Originally it was just an 'if do > if do else if do else' statement).

if elif else statement

Edited by FuzzyButt on Wed, 10/20/2021 - 13:56
Last seen on 10:33, 13. Aug 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
SOLVED: Ok, so I solved it. …
Wed, 10/20/2021 - 13:55

SOLVED: Ok, so I solved it.  I had to delete what I had as it kept throwing an error about it being corrupted or empty for some reason.  I created a new procedure, thought I had fixed it so I typed this reply but, like the good smort boy I am,  before celebrating I remembered 'always test your code'.  I tested 4 different possible solutions and found it to work with 'if do > if do x3' .  Tested and works.  I will link the photo so if anyone else needs a reference, here it is. https://ibb.co/hm44kM0