1

Getting this in Solidity:

browser/ballot.sol:121:16: Parser Error: Expected Primary Expression.

Here is my code, says that it is the name line with the parser error

function ERC20Token(
    ) {
    balances[msg.sender] = 888888;               
    totalSupply = 88888888;                        
    name = “DoubleHappiness";                                
    decimals = 8;                           
    symbol = “DBL";                               
}
  • function ERC20Token( ) { balances[msg.sender] = 888888; totalSupply = 88888888; name = “DoubleHappiness"; decimals = 8; symbol = “DBL"; } – aka Jan 9 '18 at 5:40
  • 1
    The code you shared here has weird quote characters ( instead of "). Any chance that's the issue? – user19510 Jan 9 '18 at 5:49
  • This usually happens when you copy and paste code from certain webpages - it's happened me before! – Malone Jan 9 '18 at 9:20
0

There’s a different quotation mark opening the string assigned to name.

name = **“**DoubleHappiness";  

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.