These are chat archives for Nethereum/Nethereum

11th
Nov 2016
Roy Pun
@roypun
Nov 11 2016 08:45
@juanfranblanco Would like to ask when will this commit be release?
Nethereum/Nethereum@74ef088
Vladimir Milenko
@VladimirMilenko
Nov 11 2016 11:23
That's strange. Contracts return nothing
Vladimir Milenko
@VladimirMilenko
Nov 11 2016 11:32
i mean, function that state variables in contract are not available via calls
Vladimir Milenko
@VladimirMilenko
Nov 11 2016 13:32

@juanfranblanco
I have this contract:
uint public LatestMessage = 0;
function NotificationService(){
owner = msg.sender;
}
function getNewMessagesCount(uint state) returns (uint,bool){
return (LatestMessage,true);
}
function getNewMessage(uint id) returns (string,address){
if(msg.sender == owner)
return (Messages[id].Content,Messages[id].Sender);
}
function setNewMessage(string message,uint messageType){

    Messages[LatestMessage] = Message({Type:messageType,Content:message, Sender:msg.sender});
    LatestMessage++;

}

after calling setNewMessages i want to get LatestMessage. But it always returns 0

Juan Blanco
@juanfranblanco
Nov 11 2016 17:40
this is not packaged
@roypun it is released
Juan Blanco
@juanfranblanco
Nov 11 2016 17:45
@VladimirMilenko calls don't create transactions, i think that is your problem
Vladimir Milenko
@VladimirMilenko
Nov 11 2016 17:48
I mean, that setNewMessage is a transaction
Juan Blanco
@juanfranblanco
Nov 11 2016 17:49
doh yes, I have just seen it
it will be then because an error has occurred when setting the Messages
so it has not been able to increment the counter
check your gas
Vladimir Milenko
@VladimirMilenko
Nov 11 2016 21:59
But why is this?