current position:Home>This tap is combined with demo and can't be compiled. What's wrong and how to change it.

This tap is combined with demo and can't be compiled. What's wrong and how to change it.

2022-02-03 20:53:52 Q & A of Denglian community

contract Faucet{    //Give out ether to anyone who asks      function withdraw(unit withdraw_amount)public{    //limit withdrawal amount    require (withdraw_amount<=1000000000000000000);    //Send the amout to the adress that requested it    msg.sender.transfer(withdraw_amount);    }    //Accept any incoming amount    function() public payable{}}

teacher , This Demo What's wrong , Why can't I compile it [ Pout ]




Take the answer 1:
function withdraw(unit withdraw_amount)public{

Parameter type is uint instead of unit After modification , stay 0.4.24 Version compilation passed






Other answers 1:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032053509058.html

Random recommended