-1

browser/ballot.sol:3:28: Warning: Functions in interfaces should be declared external.

interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
                           ^-----------------------------------------------------------------------------------------------^

browser/ballot.sol:185:17: Warning: Using contract member "balance" inherited from the address type is deprecated. Convert the contract to "address" type to access the member, for example use "address(contract).balance" instead.

require(this.balance >= amount * sellPrice);      // checks if the contract has enough ether to buy
        ^----------^
  • You changed the entire question after a perfectly correct answer to it. Prefer asking a new question when your previous one gets answered. – Ayushya Apr 27 '18 at 1:25
  • Lol, changed again. Why do people not understand the meaning of a downvote. – Ayushya Apr 27 '18 at 2:07
  • sorry, i actually don't know how to use properlty this platform, i´m new, but from now i'll publicate a new cuestion if i have one – Roy Apr 27 '18 at 2:28
0

The problems:

  • Constructor declared incorrectly. It does not require contract name.
  • C should be small cases in constructor.

Constructor can be declared by using the keyword constructor and nothing else is required. The correct way is as follows:

constructor(uint256 initialSupply , string tokenName , string tokenSymbol) public {
}

Update:

Resolving new errors:

  • assign is not a valid keyword. Remove assign and errors will be gone.
  • thank you i fixed, but now appears another errors – Roy Apr 27 '18 at 1:15
  • do you know how to fix the new ones? – Roy Apr 27 '18 at 1:19
  • @Roy I have updated my answer – Ayushya Apr 27 '18 at 1:27
  • thank you, but now a got a warning – Roy Apr 27 '18 at 1:59
  • @Roy read the warning. They answer your questions. And don't worry about them, they are just warnings. – Ayushya Apr 27 '18 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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