Answers for "The called function should be payable if you send value and the value you send should be less than your current balance."

1

The called function should be payable if you send value and the value you send should be less than your current balance.

"The called function should be payable" is a wild guess of a hint and 
usually wrong. The contract has reverted for any number of reasons. 
You will have to use debugging techniques to zero in on the actual 
cause which could be array index out of bounds, divide by zero, 
one of the requires isn't happy, etc.

I made it as far as Item.sellItem(). As a general observation, there 
is a little too much going on in this one transaction. You should try 
to simplify and eliminate the for loops.

It looks like you are using Remix. The debugger might help you zoom in 
on the actual problem. You might see the problem if you step over the 
code until it blows up.

Hope it helps.
Posted by: Guest on March-25-2022

Code answers related to "The called function should be payable if you send value and the value you send should be less than your current balance."

Browse Popular Code Answers by Language