can somebody help me out with the syntax on this?

if ( 500 < v:GetNWInt(“EXP”) < 5000 ) == true then

somefunction here

[lua]

if (v:GetNWInt(“EXP”) < (5000+500) ) then

somefunction()

end

[/lua]

I have no idea what you are trying to accomplish.

500 < v:GetNWInt(“EXP”) is true or false. You can’t perform arithmetic operations or comparisons on true or false.

local exp = v:GetNWInt(“EXP”)

if exp > 500 and exp < 5000 then

well, i knew this wasn’t the right syntax for this, but essentially i want to a function to occur when exp is within a certain domain such as 500 through 5000

also, sorry this isn’t in the questions subforum, can’t move it now :E

[editline]12th November 2011[/editline]

Thanks good sir without a hat, you’re a lifesaver!

[lua]

function math.ValueIsBetween(num,min,max)

if num>min and num<max then

return true

end

return false

end

if math.ValueIsBetween(v:GetNWInt(“EXP”),500,5000) then

somefunction()

end

[/lua]

This is probably pretty stupid, but that might be about how it goes

Why would you need a function for something so trivial?

if ( 500 < v:GetNWInt(“EXP”) and v:GetNWInt(“EXP”) < 5000 ) == true then

somefunction here

end

You can’t have more than one test operation at a time.

Things like

x < y < z can’t work since x < y returns a bool and you’d end up doing bool < z.

You also don’t need the “== true”.