Skip to content

Commit

Permalink
gelopfalcon#7 added pokemon type using a string array
Browse files Browse the repository at this point in the history
  • Loading branch information
albbeltran committed Jul 20, 2022
1 parent d605339 commit 615f6f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/PokemonFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down

0 comments on commit 615f6f5

Please sign in to comment.