pragma solidity ^0.5.13;

contract WorkingWithVariables {
    uint256 public myUint
    function setMyUint(uint_myUint) public {
        myUint = _myUint;
    bool public mybool;
    function setMyBool(bool_myBool) public {
        myBool = _myBool;

line 6

ParserError: Expected ‘;’ but got ‘function’ Function setmyuint (uint_myuint) public { ^_ ____ ^

  • I’m voting to close this question because it's a very low-quality question with no real contribution. You're missing a space between parameter type and parameter name on each one of these functions, you're missing a semicolon after uint256 public myUint, and you've written mybool with a lower-case b in some cases and with a higher-case B in other cases. The code is simply too sloppy. You should be more meticulous! – goodvibration Jul 7 '20 at 15:23
  • thank you goodvibrator i mean @goodvibration , you're right its fixed now. this code was from a course im doing because ya know im a brand new programmer. you can close if you want idc. – scott Jul 7 '20 at 17:30

Solidity requires lines to end in a semicolon. Simply change this line:

    uint256 public myUint

to this

    uint256 public myUint;
  • Thanks man, you're highly appreciated – scott Jul 7 '20 at 21:47

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.