Did he say exactly why it was considered "illegal parking"?....
Were you not in a parking space?
Was the park closed?
Man, I have never understood why the cops hassle kids like that, when they know damned well that they're just looking for a little privacy. I had the same thing happen to me a couple of times when I was your age, and I recall that it was VERY annoying. There was nothing illegal going on... no drinking, no pot, no loud noise... I was parked perfectly legally, and they STILL told me to "move on"...
Mike