pragma solidity ^0.4.18; contract Players { struct Player { uint8 score; uint8 transferValue; uint8 position; } mapping (uint16 => Player) public playerIdIndexToPlayer; function setPlayer( uint16 playerId, uint8 score, uint8 transferValue, uint8 position ) public { playerIdIndexToPlayer[playerId] = Player({ score: score, transferValue: transferValue, position: position }); } }
0.4.18