Hi,
I'm trying to call the burnBatch function from the standard erc721 implementation, but I get these errors:
"Invalid implicit conversion from uint8[3] memory to uint256 memory requested"
"Invalid implicit conversion from uint256[3] memory to uint256 memory requested"
Code:
function landOnPlanet(uint[] memory ships, uint16 planetID, bool successful) private {
uint256 numberOfLight_Ships;
uint256 numberOfMedium_Ships;
uint256 numberOfLarge_Ships;
for(uint8 i= 0; i<ships.length; i++) {
require(containsInSpace(ships[i],planetID), "dont have that ship");
whichShipsAtSpace[msg.sender][planetID][shipIndexInFromSpace(ships[i], planetID)] = whichShipsAtSpace[msg.sender][planetID][whichShipsAtSpace[msg.sender][planetID].length - 1];
whichShipsAtSpace[msg.sender][planetID].pop();
if(successful){
whichShipsAtPlanet[msg.sender][planetID].push(shipsArray(ships[i]));
}
if(ships[i]==1){
numberOfLight_Ships += 1;
}
if(ships[i]==2){
numberOfMedium_Ships += 1;
}
if(ships[i]==3){
numberOfLarge_Ships += 1;
}
}
if(successful){
setPlanetOwner(planetID);
} else {
//ERROR LINE!!!
burnBatch(msg.sender,[1,2,3],[numberOfLight_Ships,numberOfMedium_Ships,numberOfLarge_Ships]);
}
}
Don't know how to pass the values, when I try on remix I can call the burnBatch function directly with [1,2,3].
Thanks!!!