i´m learning Solidity now, and i saw this code on web but when i try to use the method "Deposito" i receive a error. Someone knows what's that ? (PS.: I try to put the value but every time i chose another value different from 0 don't work).
I was using the remix to test code.
pragma solidity ^0.4.2;
CODE:
mapping (address => uint) private saldos;
function deposito() public returns (uint) {
saldos[msg.sender] += msg.value;
// Sem necessidade de "this." ou "self." para variáveis de estado
// todos as variáveis são inciadas com seu valor default
LogRealizacaoDeDeposito(msg.sender, msg.value); // dispara evento
return saldos[msg.sender];
}