ERROR IN THE CODE! #6448
MOHAMMED-THE-SWE
started this conversation in
General
Replies: 1 comment
-
to make a function payable with ether, you must add the payable modifier. Modifiers come after the visibility specifier (public). function pay() public payable {
require(msg.value.convert() > number,"fuck you");
addresses.push(msg.sender);
map[msg.sender] = msg.value;
} check this cheatsheet and scroll down to 'modifiers' for more info. |
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
-
My function
My error:
Can someone tell me why i got this error?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions