# npccleanc

! {This checks to see if the last entry is empty. If it is not, it closes out of the cleanup code. If the entire array is empty, it closes out the cleanup code. Otherwise, it cleans out the last entry, then repeats.}

! {Initializes the process to set the array number}
tempcclean = arrsize('$Cstat_PersType')
tempcclean -= 1

! {Sets the starting point, makes sure the temp array index is valid, then checks to see if it needs to be purged. Then purges it if it does. After purging, it returns to the starting point.}
:cstatcleanuploop
if tempcclean >= 0:
	if $Cstat_PersType[tempcclean] = '':
		killvar '$Cstat_firstname', tempcclean
		killvar '$Cstat_nickname', tempcclean
		killvar '$Cstat_lastname', tempcclean
		killvar '$Cstat_usedname', tempcclean
		killvar '$Cstat_notes', tempcclean
		killvar 'Cstat_dob', tempcclean
		killvar 'Cstat_vit', tempcclean
		killvar 'Cstat_str', tempcclean
		killvar 'Cstat_int', tempcclean
		killvar 'Cstat_will', tempcclean
		killvar 'Cstat_mag', tempcclean
		killvar 'Cstat_agil', tempcclean
		killvar 'Cstat_drunk', tempcclean
		killvar 'Cstat_undies', tempcclean
		killvar 'Cstat_cyc', tempcclean
		killvar 'Cstat_fert', tempcclean
		killvar '$Cstat_firstpart', tempcclean
		killvar '$Cstat_lastpart', tempcclean
		killvar '$Cstat_kidpater', tempcclean
		killvar 'Cstat_gender', tempcclean
		killvar '$Cstat_thdick', tempcclean
		killvar 'Cstat_dick', tempcclean
		killvar 'Cstat_sexskill', tempcclean
		killvar 'Cstat_spermpot', tempcclean
		killvar 'Cstat_vag', tempcclean
		killvar 'Cstat_ass', tempcclean
		killvar 'Cstat_hymen', tempcclean
		killvar 'Cstat_Pavrep', tempcclean
		killvar 'Cstat_Godrep', tempcclean
		killvar 'Cstat_app', tempcclean
		killvar 'Cstat_makeup', tempcclean
		killvar 'Cstat_hair', tempcclean
		killvar 'Cstat_skin', tempcclean
		killvar 'Cstat_bodyhair', tempcclean
		killvar 'Cstat_breath', tempcclean
		killvar 'Cstat_hipcurv', tempcclean
		killvar 'Cstat_hgt', tempcclean
		killvar 'Cstat_bust', tempcclean
		killvar 'Cstat_nips', tempcclean1
		killvar 'Cstat_fat', tempcclean
		killvar 'Cstat_muscle', tempcclean
		killvar 'Cstat_pubes', tempcclean
		killvar 'Cstat_hairlng', tempcclean
		killvar 'Cstat_haircol', tempcclean
		killvar 'Cstat_haircurl', tempcclean
		killvar 'Cstat_tan', tempcclean
		killvar 'Cstat_lip', tempcclean
		killvar 'Cstat_lashes', tempcclean
		killvar 'Cstat_eyesize', tempcclean
		killvar 'Cstat_eyecol', tempcclean
		killvar 'Cstat_dom', tempcclean
		killvar 'Cstat_sub', tempcclean
		killvar 'Cstat_glasses', tempcclean
		killvar 'Cstat_grades', tempcclean
		killvar 'Cstat_run', tempcclean
		killvar 'Cstat_vball', tempcclean
		killvar 'Cstat_nerd', tempcclean
		killvar 'Cstat_shoot', tempcclean
		killvar 'Cstat_sew', tempcclean
		killvar 'Cstat_serve', tempcclean
		killvar 'Cstat_chess', tempcclean
		killvar 'Cstat_dnc', tempcclean
		killvar 'Cstat_erodnc', tempcclean
		killvar 'Cstat_jab', tempcclean
		killvar 'Cstat_punch', tempcclean
		killvar 'Cstat_kick', tempcclean
		killvar 'Cstat_def', tempcclean
		killvar 'Cstat_sing', tempcclean
		killvar 'Cstat_teach', tempcclean
		killvar 'Cstat_Qstlvl', tempcclean
		killvar 'Cstat_rel', tempcclean
		killvar 'Cstat_love', tempcclean
		killvar 'Cstat_job', tempcclean
		killvar 'Cstat_cloc', tempcclean
		killvar '$Cstat_dad', tempcclean
		killvar '$Cstat_mom', tempcclean
		killvar '$Cstat_pic', tempcclean
		killvar 'Cstat_herpes', tempcclean
		killvar 'Cstat_syph', tempcclean
		killvar 'Cstat_gon', tempcclean
		killvar 'Cstat_chlam', tempcclean
		killvar 'Cstat_Hiv', tempcclean
		killvar 'Cstat_genwart', tempcclean
		killvar 'Cstat_Thrush', tempcclean
		killvar 'Cstat_Malen', tempcclean
		killvar 'Cstat_Chem', tempcclean
		killvar 'Cstat_Clothpref', tempcclean
		killvar '$Cstat_PersType', tempcclean
		tempcclean -= 1
		jump 'cstatcleanuploop'
	end
end

! {If no further purge is necessary, it cleans up the variable.}
killvar 'tempcclean'

--- npccleanc ---------------------------------

