hello, newbie here with some basic programming knowledge here.
I created my own token, now I want to add crowdfunding contract to it. I get this error when copying code from official tutorial.
Using the latest ethereum mist and solidity 0.4.2
Unused local variable
contract token { function transfer(address receiver, uint amount){ } }
This is the code:
pragma solidity ^0.4.2;
contract token { function transfer(address receiver, uint amount){ } }
contract Crowdsale {
address public beneficiary;
uint public fundingGoal; uint public amountRaised; uint public deadline; uint public price;
token public tokenReward;
mapping(address => uint256) public balanceOf;
...
Thank you for your help! :)
The two variables address receiver, uint amount are not used in the code, please remove their names and just leave their types:
contract token { function transfer(address, uint){ } }
@alexvandesande is there a way to show warnings as warnings in Mist? They are currently treated as errors. This has come up quite a few times so far.
Perhaps with a tick box for "treat warnings as errors", which is on by default and turning it off shows a giant red popup message :)
@axic you're correct I will fix that
Tracked in https://github.com/ethereum/mist/issues/2797.
@alexvandesande apparently I've created an issue a while ago :)
Most helpful comment
The two variables
address receiver, uint amountare not used in the code, please remove their names and just leave their types: