Look At This Code.

Amber1Amber1 Member Posts: 1
edited April 17 in Solidity

pragma solidity ^0.4.0;
contract Ballot {
address buyingtickets; // the address people will pay to in order for a chance to win in the lottery

address aticketforthelottery; // 1 address that payed ether to buyingtickets
aticketforthelottery [] peoplewhoareenrolledinthelottery; // creating an array for all the people that payed ether to buying tickets

if (buyingtickets.payable = 0.5 eth) { // if someone send 0.5 ether to buying tickets
buyingtickets.tx.orgin = peoplewhoareenrolledinthelottery; // then whoever sent the transaction is not apart of the array named peoplewhoareenrolledinthelottery
}
}
This code is simply storing the addresses of people into an array to those that pay 0.5 ether to buying tickets address. I am new to solidity and coding in general any tips to how this code be fixed in the remix IDE.
Post edited by o0ragman0o on

Comments

  • DigitalBusinessDigitalBusiness Member Posts: 5
    function() public payable{

    }
  • ethanscottethanscott Member Posts: 3
    Amber1 said:


    pragma solidity ^0.4.0;
    contract Ballot {
    address buyingtickets; // the address people will pay to in order for a chance to win in the lottery

    address aticketforthelottery; // 1 address that payed ether to buyingtickets
    aticketforthelottery [] peoplewhoareenrolledinthelottery; // creating an array for all the people that payed ether to buying tickets

    if (buyingtickets.payable = 0.5 eth) { // if someone send 0.5 ether to buying tickets
    buyingtickets.tx.orgin = peoplewhoareenrolledinthelottery; // then whoever sent the transaction is not apart of the array named peoplewhoareenrolledinthelottery
    }
    }
    This code is simply storing the addresses of people into an array to those that pay 0.5 ether to buying tickets address. I am just starting to learn solidity and coding in general any tips to how this code be fixed in the remix IDE.
    Hey there.
    I figured it has been almost a year since you started out with solidity and was wondering if you could give me an insight on whether it is worth learning solidity.
    The thing is I am interested in this contract-oriented programming for now, but I am not sure how it will pan out in the future.
    Can I genuinely build a career out of this?
    Will I need any extra knowledge on any other programming language?
    Will I need any extra material if I opt for an online course?
    How long will it take to learn solidity?
Sign In or Register to comment.