0

I am new to remix and can't figure out what is wrong with this basic function.

pragma solidity ^0.5.1;
  contract Pie {
  uint256 public p;
}


function pie () public returns (uint256) {
         uint256 x = p;
         returns x;
         }


  • Am I missing something super simple like a semi colon somewhere? – user3393561 May 20 at 23:25
1

Lol for people who look at this in the future, the error was simple.

My functions weren't in the contract.

  • Thanks for circling back to let us know it's resolved. It might help someone else. You are allowed to accept your own answer if you want. – Rob Hitchens - B9lab May 21 at 1:07

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.