Was in the city of Providence, (30 minutes from my home which is also in RI) when I stumbled upon an abandoned building. It was fenced off, except for an opening for cars (there were two cars near the building). I went inside only to be approached by a police officer who immediately told me to unfold my pockets and take off my backpack. I asked him if I was being arrested or being detained, to which he replied "take off the bag". I had about a gram in the bag, (thought he was asking for consent) and kept asking him if I was being arrested. This went on till he said that unless I took off the bag and showed him my pockets that I would face a year in prison for trespassing on RI state property, to which I responded by showing him the contents of my pocket and bag. He told me to sit, put handcuffs on, and searched the bag. After finding the marijuana, he said something about a code 3 into his mic and three squad cars (and a detective) arrived on scene and I was taken in a different officer to the station. After I was released and asked for a copy of the police report, it said on there that I had tried to trick the officer multiple times. Anyway my main question is I'm currently 17 turning 18 in September going to a juvenile drug court sometime soon, should I consult an attorney and what should I be looking towards?