title: solidity, set value to state Variables, the value not changed
body: <p>I'm trying to change the state variable value of solidity, and test on the geth console, but the value of state variable is not changed.
  The steps are as below：<p>
  1: Write a simple smart contract code by solidity as below</p>
  
  <pre><code>pragma solidity ^0.4.0;
  
  contract SimpleStorage {
  
  uint public storedData=99;
  mapping(string =&gt; uint)  balances;
  
  
  
  function set(uint x) public returns (uint){
  
      storedData = x;
      return storedData;
  
  }
  
  function get() public constant returns (uint) {
  
      return storedData;
  
  }
  
  function multiply(uint a) returns(uint d) {
      return a * 7;
  }
  
  function setmapping(string key,uint value) returns(uint v)
  {
       balances[key] = value;
       return balances[key];
  }
  
  function getmapping(string key) returns(uint v)
  {
      return balances[key];
  }
  
  function kill()
  { 
  
  }
  
  
  }
  </code></pre>
  
  <p><p>2: compile the code by the truffle, use command</p>
  
  <pre><code>truffle compile
  </code></pre>
  
  <p><p>3:start the geth, unlock account, and start the minner</p>
  
  <p><p>4:deploy the smart contract</p>
  
  <pre><code>truffle migration --reset
  </code></pre>
  
  <p>and then I see the console output as below</p>
  
  <pre><code>Using network 'development'.
  Running migration: 1_initial_migration.js
  Replacing Migrations...
  ... 0x8ccf9e1599c2760ff3eed993be10929403e1faa05489a247a067f4f06536c74c
  Migrations: 0xec08113a9e810e527d99a1aafa8376425c4a75ed
  Saving successful migration to network...
  ... 0xedbf12715b736759e9d9297cbaaeb3151d95f478c2f1ee71bff4819d2dbb47e5
  Saving artifacts...
  Running migration: 2_deploy_contracts.js
  Replacing SimpleStorage...
  ... 0xff5b00f9b14d8ecea4828c3ad8e9dbfa9d685bc0b81530fc346759d7998b060f
  SimpleStorage: 0x96cf1e076f4d99a5d0823bd76c8de6a3a209d125
  Saving successful migration to network...
  ... 0x3452a9e76b73e250de80874ebc3fd454724ebf6a15563bee0d5ba89b7b41909f
  Saving artifacts...
  </code></pre>
  
  <p>which means the smart contract deployed to geth successfully</p>
  
  <p><p>5: Then in the geth console, I set abi variable as below:</p>
  
  <pre><code>abi=[{"constant":true,"inputs":[],"name":"storedData","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"changeStorage","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"kill","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"getAll","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"set","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"key","type":"string"},{"name":"value","type":"uint256"}],"name":"setmapping","outputs":[{"name":"v","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"refrenceType","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"changeMemory","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"key","type":"string"}],"name":"getmapping","outputs":[{"name":"v","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"a","type":"uint256"}],"name":"multiply","outputs":[{"name":"d","type":"uint256"}],"payable":false,"type":"function"}]
  </code></pre>
  
  <p><p>6: Get an contract instant as below:</p>
  
  <pre><code>test=eth.contract(abi).at("0x2f3970e8e4e2f5ed4ccb37b0f79fe5598700e2f0")
  </code></pre>
  
  <p><p>7: Run the set()</p>
  
  <pre><code>test.set.call(22);
  </code></pre>
  
  <p>The out put is 22, which I think the state variable storedData was successfully set to the new value 22, but when I run below code to read the storedData,</p>
  
  <pre><code>test4.get()
  </code></pre>
  
  <p>the return value is still 99, which mean the value of  storedData was not changed, beside use the uint to do the testing, I also tried the mapping, but the answer is as same as uint, I don't know if I was wrong in somewhere or the state variable is not allowed to be modified, could anyone help me? </p>
  
  <p>Thanks.</p>