#Native variant type conversion failed

1 messages · Page 1 of 1 (latest)

errant trout
#

kindly paste the code, please & thanks

latent wedge
#

Fone

#

Done

ancient zealot
#

I translate the error into English: incorrect type of argument number 1, you need to specify string or ItemType, line 200

#

I realized what's wrong

#
new mc.ItemStack(blockInfo ? (blockInfo.item, blockInfo.itemPerLevel) : (currentBlock.typeId, 1));

JS treats this as 1 argument, not two. You need to write like this:

let item = blockInfo ? new mc.ItemStack(blockInfo.item, blockInfo.itemPerLevel) : currentBlock.getItemStack() 
latent wedge
#

I gonna try