0

I CHANGE THIS:

modifier onlyOwner() { if (msg.sender != owner) { throw; } _; }

TO THIS:

modifier onlyOwner() { require(msg.sender == owner); _; } _; }

And i receive this error in REMIX: Parsererror : expected identifier but got ";"

_;

Please help help

thanks

1

You want the following:

modifier onlyOwner() { 
    require(msg.sender == owner); 
    _;         
} 

Single underscore, and matching number of braces. Using correct indentation will help you spot similar issues.

I'd also recommend using an IDE/editor that has brace/bracket matching, or using a prettify-ing package.

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.