These are chat archives for ethereum/tutorials

23rd
Jun 2016
agidigbo
@agidigbo
Jun 23 2016 00:05
am new to ether, and trying to download the wallet from ether site, today is the 5th day, still downloading, can any one help, is this normal or any better wallet for ether?
scorpiovn
@scorpiovn
Jun 23 2016 03:44
I am writing a smart contract

contract SimpleStorage {

string storedData;

struct LinkedList {
    string head;
    string tail;
    //unit32 size;
    // mapping (string => Element) elements;
}

LinkedList list = LinkedList({head:"abcXXX", tail:""});

function set(string file) {
    storedData = file;

    // Element e = list.elements[file];
    // e.data = file;
    list.head = file;
}

function get() constant returns (string retVal) {
    return storedData;
}

function getHead() constant returns (string head) {
    return list.head;
}

}

I always get getHead() method returns empty.
Could you please give me some ideas about this?
Dabtzar
@Dabtzar
Jun 23 2016 08:10
noob here needs some help please
im trying to setup a contract via the wallet gui

when I try to add the
function transfer(address _to, uint256 _value) {
/ Check if sender has balance and for overflows /
if (balanceOf[msg.sender] < _value || balanceOf[_to] + _value < balanceOf[_to])
throw;

/* Add and subtract new balances */
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;

}

i get an error
scorpiovn
@scorpiovn
Jun 23 2016 08:43
Hi guys,\
I need some help.
I am writing a smart contract like this
contract SimpleStorage {
struct Element {
    string previous;
    string next;
    string data;
}

string storedData;
string tail;
mapping (string => Element) elements;

function set(string x) {
    Element e = elements[x];
    storedData = x;
}

function getHead() constant returns (string retVal) {
    return storedData;
}
}
I don't know why the method getHead() is always empty although I run set(x) first.
Please help.
doniachen
@doniachen
Jun 23 2016 22:32
hello