Warning: unused local variable #6301
-
Hello, everyone! Please i am a bit stuck on lesson 4; the fund me code Warning: Unused local variable. this is the error i keep seeing |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
As to my knowledge it is just warning and not error. It is basically what it's saying, so you have declared variable but you have never used it later in your code. If you are doing lesson 4 you should be using code below as we will be using only 1 variable provided from latestRoundData function. (, int256 answer, , , ) = priceFeed.latestRoundData();
// ETH/USD rate in 18 digit
return uint256(answer * 10000000000); |
Beta Was this translation helpful? Give feedback.
Hi @dannyakorede12
As to my knowledge it is just warning and not error. It is basically what it's saying, so you have declared variable but you have never used it later in your code. If you are doing lesson 4 you should be using code below as we will be using only 1 variable provided from latestRoundData function.