pragma solidity 0.8.0; contract Smart2 { struct Play { address payable player; uint256 timestamp; } mapping(uint => mapping(uint => Play)) public seassons; constructor() { //1 not working (Compiled) seassons[0][0] = Play(payable(msg.sender), block.timestamp); //2 not working (Compiled) Play storage player = seassons[0][0]; // When using payable in the Play struct, you also have to use payable() for addresses you put into the struct. player.player = payable(msg.sender); player.timestamp = block.timestamp; // Kept it commented out since it was defined equally in line 17 //seassons[0][0] = Play(msg.sender, block.timestamp); // Use as line 17 // seassons.push([(Play(msg.sender, block.timestamp))]); } }
0.4.18