I have an array of bytes10 inside a mapping, like this:
mapping(uint => bytes10[]) public Players;
I want to check if a certain index exists in the bytes10 array.
I tried to check it with .length but it throws opcode error when the index does not exist.
mappinghave to do with all of this? Doesn't sound related to your problem. – goodvibration Jan 14 '20 at 15:43Players[_id][i].lengthresults in same opcode error. – saman.shahmohamadi Jan 14 '20 at 15:45Players[_id].lengthresult with? (spoiler: 0 - does that answer your question)? – goodvibration Jan 14 '20 at 15:49ido you use in the expressionPlayers[_id][i].length? – goodvibration Jan 14 '20 at 15:55xonly at indexes between0andx - 1. – goodvibration Jan 14 '20 at 15:59Players[_id][i].lengthonly foribetween0andPlayers[_id].length - 1(in your example, between 0 and 3). – goodvibration Jan 14 '20 at 16:37