Noob need help. #94
Answered
by
zchuanru
keithevans786
asked this question in
Q&A
-
Hello sir/mam, struct People {
uint256 favouriteNumber;
string name;
} It gives error :
Please help i am unable to move forward. This is my entire code currently written by seeing freecodecamp's video, // SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;
contract SimpleStroage {
// boolean, uint, int, address, bytes
uint256 public favouriteNumber;
People public person = People({favouriteNumber: 2, name: "Keith"})
struct People {
uint256 favouriteNumber;
string name;
}
function store(uint256 _favouriteNumber) public {
favouriteNumber = _favouriteNumber;
} |
Beta Was this translation helpful? Give feedback.
Answered by
zchuanru
Jun 2, 2022
Replies: 2 comments 2 replies
-
Hi, You forgot a semi colon at the end of this line:
and you forgot } at the end of the whole code. Hope this helps. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
PatrickAlphaC
-
Oops, you forgot a semi column ; : |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
You forgot a semi colon at the end of this line:
and you forgot
} at the end of the whole code.
Hope this helps.