简体   繁体   中英

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);
}

}

You have a typo, using the letter o<\/code> instead of the number 0<\/code> .

require(msg.value > 0.1 ether); 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM