Problem using UNET

Hi guys,

Currently I am programming a Bomberman for school, and I followed this guide for that:

I have almost finished it, but I can’t find the way to join a match through buttons. Every time I try to do it, this message appears:

‘ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index’

And it points to this line of code:

networkManager.matchMaker.JoinMatch(matches [0].networkId, string.Empty, string.Empty, string.Empty, 0, 0, OnMatchJoined);

What can I do?

Thanks in advance!

Check the length or count of “matches” just before that line. I’m expecting you’ll find that the result is 0.

Indeed, the length is 0. What should I do? The match is created, but it looks as it is not able to find it.