$1 stays set after sourcing shell script.

ok, so I have a shell script that can be called using the first argument ($1) or not. This argument is a word (Tim for example) and not an actual flag (-x for example). If I call the script with an argument and call the same script without one, it believes that I provided an argument. Note here that I am sourcing this script (. ./scriptname.sh [argument]). I thought checking to see if $1 was non-zero (-n) was good logic, but apparently it isn't. Is there some way to unset $1? Any an all responses would be greatly appreciated. I was told to try using $OPTARG, but doesn't this require an actual flag? A code sample would be great if someone knows how to use it without one.

This script is being ran under ksh, in case anyone was wondering.

use :

 
$#

I think you may be missing my problem. If I run my script with 1 arguments, $# is equal to 1. If I run this script again without arguments, during the same ssh session, $# is still 1. I'm trying to find out how to clear $#, $@, etc. so this doesn't keep holding onto the values.