[SOLVED] If statement not working

My If statement doesn’t work, It prints the WeaponR variable as 0 but the if statement doesn’t continue even though 0 is less than 500, what I wanted it to do is assign the Rookie rank with 500 max exp.

function GetMaxExp()
	local WeaponR = _G.pData.WeaponRank
	warn("Getting")
	warn(WeaponR)
	if WeaponR <- 500 then
		warn("Rookie")
		WeaponRank = "Rookie"
		MaxExp = 500
	elseif WeaponR >= 500 and WeaponR <- 700 then
		WeaponRank = "Advanced"
		MaxExp = 700
	elseif WeaponR >= 700 and WeaponR <- 1100 then
		WeaponRank = "Elite"
		MaxExp = 1100
	elseif WeaponR >= 1100 and WeaponR <- 1600 then
		WeaponRank = "Honored"
		MaxExp = 1600
	elseif WeaponR == "Maximum" then
		WeaponRank = "Maximum"
		MaxExp = "Max"
	end
	warn("MaxExp"..MaxExp)
	SetupIndex()
end
1 Like
<-

not sure if you did this purposely or mistaken - as =.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.