NFT Game Part 4

I’m currently on part 4 of the NFT Game tutorial and I’m getting this error when I click the button to feed the pet

web3.min.js:13 Uncaught (in promise) TypeError: Cannot read property 'length' of undefined at h.formatParam (web3.min.js:13) at web3.min.js:13 at Array.map (<anonymous>) at h.encodeParameters (web3.min.js:13) at web3.min.js:13 at Array.map (<anonymous>) at Object.d._encodeMethodABI (web3.min.js:13) at Object.d._processExecuteArguments (web3.min.js:13) at Object.d._executeMethod (web3.min.js:13) at feed (main.js:65)

The line of code the console is pointing to is contract.methods.feed(petId).send({from: ethereum.selectedAddress}).on("receipt",( ()=>{ console.log("done"); renderGame(); })) in the feed function
I’m unsure what the error could be as the code looks the same as the tutorial
any help would be appreciated
Best
Matthew

1 Like

Please take a look at our troubleshooting thread at FAQ - Common Issues & How To Get Help as well as how to properly make a thread in case you can’t find a solution with the first three steps.