0

hihi this is my code

    pragma solidity ^0.4.18;
contract ValueIO {

 uint myidaaaa;

 uint price = 100000000 wei;

 function Input(uint feion) public payable {
     require(msg.value > price);  

     myidaaaa = feion;
 }

 function Output() public constant returns (uint,bool) {
     return (myidaaaa,true);
 }
}

i wish user input and change myidaaaa data and pay the 1eth to my contract

but i don't know how can do this

please help me my teach

thank you so much

(the photo is error note)

enter image description here

  • Can someone help? I want to know the specific code that can be payable. Thank you very much......... – i don't like tell you hehe Mar 29 '18 at 14:09
0

Your code reverts because of your require statement. You are not sending any value to the method, therefore the require reverts.

Try adding value to the transaction - insert into the field Value at the upper right corner. For example 100000001. Then call your Input function with any input. Output will then give you the right data.

| improve this answer | |
  • hi Lauri Peltonen thank you comment i Try the transfer function but also is err maybe you would tell me where is my error i am so sorry i am beginner thank you so much!! – i don't like tell you hehe Mar 29 '18 at 10:21
  • If you have further information about the problem, please edit your own question to include the information – Lauri Peltonen Mar 29 '18 at 11:05
  • I am so sorry I don't mean to offend please forgive me – i don't like tell you hehe Mar 29 '18 at 13:54

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.