From 615f6f5d93ab387c3e230dd3a55580cf44dc343e Mon Sep 17 00:00:00 2001 From: Alberto Beltran Date: Wed, 20 Jul 2022 13:49:09 -0500 Subject: [PATCH] #7 added pokemon type using a string array --- contracts/PokemonFactory.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/PokemonFactory.sol b/contracts/PokemonFactory.sol index 1df6dfe5..2926c786 100644 --- a/contracts/PokemonFactory.sol +++ b/contracts/PokemonFactory.sol @@ -25,7 +25,7 @@ contract PokemonFactory { function createPokemon(string memory _name, string[] memory _abilityName, string[] memory _abilityDscription, string[] memory _type) public { require(bytes(_name).length > 2, "The name must have at least 2 characters."); - require((_abilityName).length == (_abilityDscription).length, "You must provide the name of each ability for each ability description."); + require((_abilityName).length == (_abilityDscription).length, "You have to provide the same number of abilitie and description."); uint _id = pokemons.length; require(bytes((_abilityName)[_id]).length > 3, "The name must have at least 3 characters.");