Yesterday the head of the IT Department here was trying to add a network drive to be mapped in the kix script (I'm not even really all that firmiliar with it, it was in place when I started here 3 months ago) hes also not knowledgable in kix language. The problem we run across now is it seems like its only entering the one IF statement for all users. Being new to this I have no idea what I'm supposed to do to fix it. I've had C/C++ and Java programming experience and this is a head scratcher. Hopefully its just something basic. I did some skimming of the forum and didn't see anything that could help me all that much. A response would be really greatly appreciated.

Heres a code snippet:

 Code:
 ;;; students and default shares


SELECT
   case INGROUP("students")
      $icsstudentprefix=LEFT(@USERID,2)
      SELECT
         case $icsstudentprefix="s-"
            $x=gci_mapdrive("U","\\ICS08\"+@USERID+$hide)
            $x=gci_mapdrive("V","\\ICS04\student")
            $x=gci_mapdrive("w","\\ICS04\icsstudent")
	    
         case 1
            ;for non ics student-teacher logons
	    $x=gci_mapdrive("U","\\ICS02\"+@USERID+$hide)
;           $x=gci_mapdrive("U","\\ICS04\"+@USERID+$hide)
            $x=gci_mapdrive("V","\\ICS04\student")
	    $x=gci_mapdrive("w","\\ICS04\icsstudent")
            $x=gci_mapdrive("S","\\ICS08\SAM2003")
      ENDSELECT

   	case 1
;     for non students
;      $x=gci_mapdrive("U","\\ICS02\"+@USERID+$hide)


;ENDSELECT

;TC Students SAM2003 Drive

;IF INGROUP("TCStudents")
;      $x=gci_mapdrive("S","\\ICS08\SAM2003")
;ENDIF


;;; Applications ;;;
; note G and X are used more than once ;

IF INGROUP("pds census users")
   $x=gci_mapdrive("F","\\ICS02\apps"+$hide)
   $x=gci_mapdrive("G","\\ICS02\data"+$hide)
ENDIF

IF INGROUP("Administrators")
   $x=gci_mapdrive("R","\\ICS02\techdept"+$hide)
ENDIF

IF INGROUP("TC ALL")
;  $x=gci_mapdrive("G","\\ICS02\gradequick")
;  $x=gci_mapdrive("X","\\ICS02\adminplus")
;  $x=gci_mapdrive("T","\\ICS02\TCFaculty")
ENDIF

IF INGROUP("Librarians")
   $x=gci_mapdrive("L","\\ICS02\Library")
ENDIF

IF INGROUP("Liturgy")
   $x=gci_mapdrive("M","\\ICS02\Liturgy"+$hide)
ENDIF

IF INGROUP("PeachTree")
   $x=gci_mapdrive("P","\\ICS02\Peachtree"+$hide)
ENDIF

IF INGROUP("ParishSoftUsers")
   $x=gci_mapdrive("S","\\ICS02\parishsoft")
   $x=gci_mapdrive(gci_nextdeptletter(),"\\ICS02\HR"+$hide)
ENDIF

IF INGROUP("Admin Plus")
   $x=gci_mapdrive("X","\\ICS02\adminplus")
ENDIF

;;; Directors ;;;

;IF INGROUP("directors")
;   $x=gci_mapdrive("W","\\server\directors")
;ENDIF


$gci_deptletter="INIT"


;;; Tech Admin ;;;

;IF INGROUP("techadmin")
;      $x=gci_mapdrive("T","\\server\users")
;      $x=gci_mapdrive("V","\\server\shared_areas")
       
;      $gci_deptletter="V"
;ENDIF

;;; Multiple Departments ;;;

FUNCTION gci_nextdeptletter()

   SELECT
      case $gci_deptletter="INIT"
	      $gci_deptletter="V"
      case $gci_deptletter="V"
	      $gci_deptletter="W"
      case $gci_deptletter="W"
;	      $gci_deptletter="X"
	      $gci_deptletter="*"
      case $gci_deptletter="X"
	      $gci_deptletter="*"
;	      $gci_deptletter="Y"
      case 1
	      $gci_deptletter="*"
   ENDSELECT

   $gci_nextdeptletter=$gci_deptletter

   $X = WRITELINE(1,"GCI next letter for multiple departments  " + $gci_deptletter + @CRLF)

EndFunction

;;; Department ;;;


IF INGROUP("ALumni Staff")
      $x=gci_mapdrive(gci_nextdeptletter(),"\\ICS02\Alumni"+$hide)
ENDIF
;IF INGROUP("TC All")
;      $x=gci_mapdrive(gci_nextdeptletter(),"\\ICS02\TC"+$hide)
;ENDIF
IF INGROUP("MIT")
      $x=gci_mapdrive(gci_nextdeptletter(),"\\ICS02\mit"+$hide)
ENDIF
IF INGROUP("Telephone Administrators")
      $x=gci_mapdrive(gci_nextdeptletter(),"\\ICS02\Telecom"+$hide)
ENDIF
IF INGROUP("Parish Office Staff")
      $x=gci_mapdrive(gci_nextdeptletter(),"\\ICS02\ParishOffice"+$hide)
	
ENDIF
IF INGROUP("Accountants")
      $x=gci_mapdrive(gci_nextdeptletter(),"\\ICS02\Accountants"+$hide)
ENDIF
IF INGROUP("ICS Principal")
      $x=gci_mapdrive(gci_nextdeptletter(),"\\ICS02\icsfrontoffice"+$hide)
ENDIF
IF INGROUP("ICS Staff")
      $x=gci_mapdrive(gci_nextdeptletter(),"\\ICS02\icsfrontoffice"+$hide)
      $x=gci_mapdrive(gci_nextdeptletter(),"\\ICS08\ICS Students"+$hide)
ENDIF
IF INGROUP("ICS ALL")
      FOR $grade = 1 to 8 STEP 1
         $gradelevel="ICS Team Grade "+CSTR($grade)
         $X = WRITELINE(1,"GCI ICS student-teacher mappings  " + $gradelevel + @CRLF)
         IF INGROUP($gradelevel)
            $x=gci_mapdrive(gci_nextdeptletter(),"\\ICS08\"+$gradelevel+$hide)
         ENDIF
      NEXT
ENDIF