I tried several times and kept getting 018-0511 error code, this occurs during loading time after I choose your town :/
Have you look up the solution here?
http://www.nintendo.com/consumer/wfc/en_na/ds/results.jsp?error_code=018-0511&system=3DS&
In the web they said
Situation:
This error code typically indicates an issue communicating and matchmaking with other players.
This is often caused by network firewalls blocking necessary network traffic.
This can be caused by your network, or the network of the person you are connecting with. If these steps do not resolve your connection issue, have your friend try them as well.
Maybe the 2nd issue caused that? because if you can open your gate means your internet connection is actually fine, right?