Take a look at the FSM on getting transmission codes
http://www.nicoclub.com/FSM/Maxima/1994/at.pdf
It tells you how to do it on page 117 and what kind of code it is on the next page. If you can't do it successfully, take it to a trusted mechanic before going to the dealer.