problem with contract

sid226sid226 Member Posts: 1
im trying to run the following contract on test network.
i compiled the contracts on online solidity compiler-
and deployed the contacts saparately .
when executing second contract function getMemberAge() i get return value 0. its not returning 123.
i executed function in following manner..

member.setAge('0xa72f1096facf978579e9d93a6cd299452ccfaa36') // address of first contract after it was mined.
member.getMemberAge() // i get return 0

heres 2 contracts-

contract Age {
uint ageNo = 123;

function getAge()constant returns(uint) {
return ageNo ;

contract Member {
// declare age contract
Age age;
uint memberAge;

function setAge(address addr)constant returns (bool b ) {
// explicit type conversion
age = Age(addr);

// calling age contract method
memberAge = age.getAge();
return true;

function getMemberAge() constant returns(uint) {
return memberAge;


Sign In or Register to comment.