Something looked odd in the function I posted, so I tried this as well:
Code:
function DiivSkins_hbar1Update()
if not (DiivSkinSettings) then
DiivSkinSettings = {}
DiivSkinSettings.hbar1 = 2
elseif(DiivSkinSettings.hbar1 == 1) then
DiivSkins_hbar1Texture:SetTexCoord(0.0, 1.0, 0.9023437, 0.984375);
elseif(DiivSkinSettings.hbar1 == 2) then
DiivSkins_hbar1Texture:SetTexCoord(0.0, 1.0, 0.8203125, 0.9023437);
etc.
still produces a nil error.
edit: sorry, still produces a nil error when called after the VARIABLES_LOADED event fires. (rather than from the slider <OnValueChanged>, where it works)