We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DON’T USE THIS uint id = zombies.push(Zombie(_name, _dna)) — 1; gives error in remix
USE THIS zombies.push(Zombie(_name, _dna)); uint id = zombies.length - 1;
sincerely Dr. Engin YILMAZ
The text was updated successfully, but these errors were encountered:
Agree, .push() no longer have a return value in solidity version (0.8.14)
.push()
Reference: https://docs.soliditylang.org/en/v0.8.14/types.html?highlight=push#arrays
Sorry, something went wrong.
No branches or pull requests
DON’T USE THIS
uint id = zombies.push(Zombie(_name, _dna)) — 1;
gives error in remix
USE THIS
zombies.push(Zombie(_name, _dna));
uint id = zombies.length - 1;
sincerely
Dr. Engin YILMAZ
The text was updated successfully, but these errors were encountered: