pragma solidity ^0.4.17;

interface IERC20Token {
    function balanceOf(address owner) public returns (uint256);
    function transfer(address to, uint256 amount) public
    returns (bool);


contract ico {
  address private owner;
  address private ops;
  address private trustee;
  mapping(address => bool) public whitelist;

  modifier ownerFunction {
      require(owner == msg.sender);

  modifier opsFunction {
    require(ops == msg.sender);

  event Whitelist(address _address);
  event UnWhitelist(address _address);
  event Error(address _address);

  function setOpp (address _oppAddress) private ownerFunction {
    ops = _oppAddress;

  function ico() internal {
    owner = msg.sender;

  function buyTokens(uint256 _value) payable {
      if (getWhitelistStatus(msg.sender) == true) {
          require(balanceOf(msg.sender) >= msg.value);
          msg.sender.transfer(trustee, msg.value);
          return true;
              returns false;

  function getWhitelistStatus(address _address) returns (bool) {
      return whitelist[_address];


  function whitelist(address _address)opsFunction {
      whitelist[_address] = true;


  function unWhitelist(address _address)opsFunction {
      whitelist[_address] = false;



I am getting the attached error while compiling the above contract.Can anyone explain what is the issue here?

1 Answer 1


Change returns to return:

return false;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.