• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Problem - ERROR: Comparing boolean with number (1 Viewer)

Joined
Mar 20, 2024
RedCents
289¢
I am struggling with what I thought would be a number, but the system says it is a boolean.

I got the following Lua code:

INI:
If mq.TLO.Me.Pet.PctHPs() < 80 then
---Heal pet
end

The problem is that the system says that mq.TLO.Me.Pet.PctHPs() is a boolean. I thought it would return the pet's health percentage as a number?
 
I am struggling with what I thought would be a number, but the system says it is a boolean.

I got the following Lua code:

INI:
If mq.TLO.Me.Pet.PctHPs() < 80 then
---Heal pet
end

The problem is that the system says that mq.TLO.Me.Pet.PctHPs() is a boolean. I thought it would return the pet's health percentage as a number?
are you sure you have the correct line / part of code that it is complaining about?

it is a number:
Lua:
> /lua parse mq.TLO.Me.Pet.PctHPs()
100
> /lua parse type(mq.TLO.Me.Pet.PctHPs())
numbe

Also, you can just use Pet instead of Me.Pet.

It might end up as nil if you had no pet but it should never be showing as boolean.
 
Problem - ERROR: Comparing boolean with number

Users who are viewing this thread

Back
Top