[Solved]Help with command index

Started by Seshua on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Solved]Help with command index
Wed, 12/23/2020 - 20:05 (edited)

Greetings

 

So I'm trying to make a command that has multiple parameters like this:

https://i.imgur.com/NyNLDvv.png

I've tried it both ways but when i type my command (/exec add diamonds) it doesn't work.

 

On the other hand I've set up another procedure that allows me to switch gamemodes with simpler commands
https://i.imgur.com/e6vj4fC.png

 

Also I tried setting it up like PIC 2 but that didn't work either. I've google searched the issue but couldn't find anything or any tutorial that explained how to used the index block past 1 parameter. Trust me when I say making a post is my last resort, I usually try to figure it out before I do that :)

Anyways any help is greatly appreciated.

*Edit*

I'm editing the OP because it wouldn't let me post my screenshot links in a reply message ?

Anyway here is how I set up the code block:

https://i.imgur.com/twqdiRA.png

I'm not exactly sure why this worked but it does. The diamonds were able to spawn in upon adding those code blocks like so.

Thank you very much Klemen for replying.

Edited by Seshua on Wed, 12/23/2020 - 20:05
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Could you try using print…
Wed, 12/23/2020 - 14:38

Could you try using print block so see what data you get from "get command parameter with index" block?

So I did it like so:

https://i.imgur.com/twqdiRA.png

Ingame:

1

2

and it worked ! I don't really understand why it worked but it does lol. I'm not sure if this is even what you meant for me to do.

Thank you very much Klemen :)