What i am attempting to do is elementary, adding a struct to a storage array. But for some reason I am getting the following error
TypeError: Indexed expression has to be a type, mapping or array (is function (struct KYC.Fraud storage ref) returns (uint256))
contract KYC {
struct Fraud {
address bank;
bytes32 accountNumber;
bytes32 routingNumber;
uint256 amount;
uint256 timestamp;
}
Fraud[] frauds;
function reportFraud (address bank, bytes32 accountNumber, bytes32 routingNumber, uint256 amount) external returns(uint256 fraudID) {
Fraud memory fraud = Fraud(bank, accountNumber, routingNumber, amount, now);
frauds.push[fraud];
return frauds.length - 1;
}