pragma solidity ^0.4.0; contract FuncConcert { address owner; uint public tickets; uint public constant price =1 ether; //diffrent modifier represent value // mapping (address => uint) public purchasers; function FuncConcert(){ owner = msg.sender; tickets =5; } function () payable{//fallback function buyTickets(1); } function buyTickets(uint amount) payable { //msg.value how much ether send this function if (msg.value != (amount*price) || amount > tickets){ throw; } purchasers[msg.sender] += amount; tickets -= amount; if (tickets==0){ selfdestruct(owner); } } /* function Balance() public returns(uint){ return this.balance(); } */ }