ModTweaker

ModTweaker

88M Downloads

[Script Issue (Probably not bug)] Empowerer Script errors

Quarris opened this issue · 2 comments

commented

Issue Description:

I tried adding recipes using the Empowerer and it errors. I assume I did my script wrong but I'm not sure what exactly is wrong.

What happens:

It doesn't add the recipe that I specified.

What you expected to happen:

Add the recipe that I specified o.o

Script used (Please Pastebin or gist your script, posting an unpasted or ungist'd script will automatically close this issue):

https://gist.github.com/Quarris/e6ab5c08bf1edf3847b499a4316b5916

Minetweaker.log file (Please Pastebin or gist your file, posting an unpasted or ungist'd file will automatically close this issue):

https://gist.github.com/Quarris/2bd3b93504d1297a9d11b6f65b4b221f


Affected Versions (Do not use "latest"):

  • Minecraft: 1.12.1
  • Forge: 14.22.0.2474
  • Crafttweaker: 1.12-4.0.6
  • ModTweaker: 4.0.2
  • MTLib: 3.0.0

Your most recent log file where the issue was present:

N/A
[pastebin/gist/etc link here]

commented

You cannot have multiple different types of values in an Array.
You put IItemStacks and ints in the same Array, so how should ZenScript know if it's an IItemStack[] or an int[]?

To fix your script, either remove the ints from the Array or go for multiple calls of the method (abandoning the array alltogether)

https://gist.github.com/kindlich/357598af41e7a31d0887cf94b226ed72
You could go for something like this ↑↑↑ , but it might be easier to go for calling the method multiple times. ↓↓↓
https://gist.github.com/kindlich/a3917dad6a3f5c65743c358af9cd8e26

Alternatively, you could go for two Arrays, one declaring the items, and one declaring the integers, that's really up to you and your style 😉

commented

Thank you very much for clarifying this for me. Im still new to scripts and all in languages and logical thinking :P Again thank you very much!