Search code examples
parsingblockchainethereumsoliditysmartcontracts

Solidity Error :: ParserError: Expected ',' but got 'Number'


Hiii, I need help Getting parser error here in the line require(msg.value > o.1 ether);

 // SPDX-License-Identifier: MIT
  pragma solidity ^0.8.0;

contract Lottery{
address public manager;
address[] public players;

constructor(){
    manager=msg.sender;
}

function enter() public payable{
   
    require(msg.value > o.1 ether);  //getting error here
    players.push(msg.sender);
}

}


Solution

  • You have a typo, using the letter o instead of the number 0.

    Corrected line:

    require(msg.value > 0.1 ether);