To explain better; First my system captures the values of my maximum health/mana, and then works out suitable levels to sip at. Then it will capture the current values of health/mana from my prompt. Once this has been completed it will then run through the first scan, making sure that I am able to sip the health elixir and that I have balance. All of this works correctly, the issue comes when I attempt to compare my current health, with the level I want to sip at.
I use the following function:
Code: Select all
function SipScan()
echo("Running SipScan: Sip Health set at: " .. Prompt[SipHealth] .. " Current Health is: " .. Prompt[CurrentHealth])
if Prompt[SipHealth] >= Prompt[CurrentHealth] then
echo("\nNeed to Sip Health")
else
echo("\nNo need to sip")
end
end
I have attempted swapping the place of "Prompt[CurrentHealth]" and "Prompt[SipHealth]" (Which are my two variables) and the sign that compares them, to no avail.H:3186 M:3888 E:100% W:100% B:100% [csdb eb]Running Can Sip Function
CanSip Is True
Running SipScan: Sip Health set at: 4460.4 Current Health is: 3186
H:3186 M:3888 E:100% W:100% B:100% [csdb eb]
It does, however all work when I change it to an inequality as such:
Code: Select all
function SipScan()
echo("Running SipScan: Sip Health set at: " .. Prompt[SipHealth] .. " Current Health is: " .. Prompt[CurrentHealth])
if Prompt[SipHealth] ~= Prompt[CurrentHealth] then
echo("\nNeed to Sip Health")
else
echo("\nNo need to sip")
end
end
Any ideas? Suggestions?H:3186 M:3888 E:100% W:100% B:100% [csdb eb]Running Can Sip Function
CanSip Is True
Running SipScan: Sip Health set at: 4460.4 Current Health is: 3186
Need to Sip Health
H:3186 M:3888 E:100% W:100% B:100% [csdb eb]