I want two functions to be checked true or false in one contract, that is, I get true in the calculations and want something. The code below shows my idea, but it does not work, I do not know why.

function transfer_money(uint _Number) pure public returns (bool){
    return true;

function transfer_property(bool) private {

    InfoProperty storage Transfer_Property = propertys[num];

    if (transfer_money()){
  • 4
    I'm voting to close this question as off-topic because it reflects a very basic lack of programming-concepts knowledge, which is not specifically related to Ethereum or to the given programming language (Solidity). – goodvibration Nov 27 '19 at 10:23
  • Thank you, I did not immediately understand what you were talking about, fixed it. It became a little embarrassing, but I still study, not so long ago I switched to practice. – GumanXD Nov 27 '19 at 14:33
  • OK, you're very much welcome. Good luck with studying and practicing. – goodvibration Nov 27 '19 at 14:37

Function transfer_money takes one input parameter.

So you cannot call transfer_money() without passing it.

  • And how to pass the parameter? – GumanXD Nov 27 '19 at 9:49
  • @GumanXD: Inside the (). I think you should probably start with the basics of programming. – goodvibration Nov 27 '19 at 9:53
  • I understand this, but he will throw an error when I try to do it. He says to do this either through another contract or through a struct. Mist says that it is not declared globally, and if I declare it, then he complains that I do not use contract or struct. " Invalid type for argument in function call. Invalid implicit conversion from bool to uint256 requested. if (transfer_money(access)){" – GumanXD Nov 27 '19 at 9:54
  • @GumanXD: "Mist says that it is not declared globally" - are you trying to call transfer_money from outside the contract??? If yes, then: 1. You should mention this as part of your question, and demonstrate how exactly you are doing it. 2. You need to declare this function public. – goodvibration Nov 27 '19 at 10:00
  • @GumanXD: And the compilation error implies that the type of access is bool, while function transfer_money expect an input parameter of type uint256. – goodvibration Nov 27 '19 at 10:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.