I'm using pragma solidity >=0.4.0 <0.9.0;
Line 34
with below code:
event studentAdded(string memory full_name, uint256 memory st_id);
I'm facing this error. Can anyone help?
ParserError: Expected ',' but got 'memory' --> contracts/Scorecard.sol:34:31: | 34 | event studentAdded(string memory full_name, uint256 memory st_id); | ^^^^^^
While removing the memory
keyword from all arguments of event definitions. I was able to compile successfully but I still can't understand the reasoning behind this. The data location should be either memory
or storage
for all the variables right?