errors with NWInt

i keep getting bombed with errors for this script


hook.Add( "PlayerTick", "AutoEnergy", function( pl )
local lvl = pl:GetNWInt( 'LVL' )
	pl:SetMoney(math.Approach( pl:GetMoney(), 100, 3 * FrameTime() ) )
	else
    pl:SetMoney(math.Approach( pl:GetMoney(), 100, 8 * FrameTime() ) )
	end
end )

Errors:


[ERROR] gamemodes/advw/gamemode/init.lua:223: attempt to compare number with string
  1. fn - gamemodes/advw/gamemode/init.lua:223
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:184


but i have set lvl to a number in a different script


self:SetNWInt( 'LVL', lvl ) -- its setting from a variable in my level script 

Where’s your if? I see else and end, but no if.

ahh yes i completley forgot thanks