It would be interesting to see what that line in the script looks like.
set height to player -> GetPos z
here is the whole script:
Begin _lanterns_global_checkfloat timershort effectshort watershort waterLevelshort heightshort waterExistsshort stateif ( MenuMode == 1) returnendifif ( state == 0 ) set waterLevel to GetWaterLevel set waterExists to 1 if ( GetInterior == 1 ) if ( waterLevel == 0 ) set waterExists to 0 endif endif if ( ScriptRunning "_lanterns_SneakPen" == 0 ) StartScript "_lanterns_SneakPen" endif set state to 1 returnendifif ( state == 1 ) if ( CellChanged == 1 ) set state to 0 return endif set height to player -> GetPos z if ( waterExists ) if ( height > waterLevel ) set water to 0 else set water to 1 ; player is under water set timer to timer + 2 ; accelerate the timer to warn player quickly endif endif if ( timer < 5 ) set timer to timer + GetSecondsPassed return endif if ( player->getSpellEffects, "_lighthigh" ) set effect to 4 elseif ( player->getSpellEffects, "_lightmed" ) set effect to 3 elseif ( player->getSpellEffects, "_lightlow" ) set effect to 2 elseif ( player->getSpellEffects, "_lightvlow" ) set effect to 1 else set effect to 0 endif set timer to 0if ( effect > 0 ) if ( player->HasItemEquipped, torch ) return endif if ( player->HasItemEquipped, torch_64 ) return endif if ( player->HasItemEquipped, torch_77 ) return endif if ( player->HasItemEquipped, torch_128 ) return endif if ( player->HasItemEquipped, torch_128_Off ) return endif if ( player->HasItemEquipped, torch_157 ) return endif if ( player->HasItemEquipped, torch_256 ) return endif if ( player->HasItemEquipped, torch_infinite_time ) return endif if ( player->HasItemEquipped, torch_infinite_time_unique ) return endif if ( player->HasItemEquipped, light_com_torch_01 ) return endif if ( player->HasItemEquipped, light_com_torch_01_77 ) return endif if ( player->HasItemEquipped, light_com_torch_01_128 ) return endif if ( player->HasItemEquipped, light_com_torch_01_200 ) return endif if ( player->HasItemEquipped, light_com_torch_01_256 ) return endif if ( player->HasItemEquipped, light_com_torch_01_off ) return endif if ( player->HasItemEquipped, light_com_torch_02 ) return endif if ( player->HasItemEquipped, light_com_lantern_01 ) return endif if ( player->HasItemEquipped, light_com_lantern_01_77 ) return endif if ( player->HasItemEquipped, light_com_lantern_01_128 ) return endif if ( player->HasItemEquipped, light_com_lantern_01_Off ) return endif if ( player->HasItemEquipped, light_com_lantern_02 ) return endif if ( player->HasItemEquipped, light_com_lantern_02_64 ) return endif if ( player->HasItemEquipped, light_com_lantern_02_128 ) return endif if ( player->HasItemEquipped, light_com_lantern_02_128_Off ) return endif if ( player->HasItemEquipped, light_com_lantern_02_177 ) return endif if ( player->HasItemEquipped, light_com_lantern_02_INF ) return endif if ( player->HasItemEquipped, light_com_lantern_02_Off ) return endif if ( player->HasItemEquipped, Light_De_Lantern_01 ) return endif if ( player->HasItemEquipped, Light_De_Lantern_01_77 ) return endif if ( player->HasItemEquipped, Light_De_Lantern_01_128 ) return endif if ( player->HasItemEquipped, Light_De_Lantern_01_177 ) return endif if ( player->HasItemEquipped, Light_De_Lantern_01_off ) return endif if ( player->HasItemEquipped, light_de_lantern_02 ) return endif if ( player->HasItemEquipped, light_de_lantern_02_128 ) return endif if ( player->HasItemEquipped, light_de_lantern_02_256_blue ) return endif if ( player->HasItemEquipped, light_de_lantern_02_256_Off ) return endif if ( player->HasItemEquipped, light_de_lantern_02_blue ) return endif if ( player->HasItemEquipped, "light_de_lantern_02-128" ) return endif if ( player->HasItemEquipped, "light_de_lantern_02-177" ) return endif if ( player->HasItemEquipped, light_de_lantern_05 ) return endif if ( player->HasItemEquipped, light_de_lantern_05_128_Carry ) return endif if ( player->HasItemEquipped, light_de_lantern_05_200 ) return endif if ( player->HasItemEquipped, light_de_lantern_05_Carry ) return endif if ( player->HasItemEquipped, light_de_lantern_06 ) return endif if ( player->HasItemEquipped, light_de_lantern_06_64 ) return endif if ( player->HasItemEquipped, light_de_lantern_06_128 ) return endif if ( player->HasItemEquipped, light_de_lantern_06_177 ) return endif if ( player->HasItemEquipped, light_de_lantern_06_256 ) return endif if ( player->HasItemEquipped, Light_De_Lantern_06A ) return endif if ( player->HasItemEquipped, light_de_lantern_07 ) return endif if ( player->HasItemEquipped, light_de_lantern_07_128 ) return endif if ( player->HasItemEquipped, light_de_lantern_07_warm ) return endif if ( player->HasItemEquipped, light_de_lantern_10 ) return endif if ( player->HasItemEquipped, light_de_lantern_10_128 ) return endif if ( player->HasItemEquipped, light_de_lantern_11 ) return endif if ( player->HasItemEquipped, light_de_lantern_14 ) return endif if ( water == 1 ) set water to 0 else StartScript _lanterns_loadgame_verify endif StartScript _lanterns_off set state to 0 StopScript _lanterns_global_checkendifendifEnd