-
Notifications
You must be signed in to change notification settings - Fork 453
Closed
Labels
bugSomething isn't workingSomething isn't workingnew solverThis issue is specific to the new solver.This issue is specific to the new solver.
Description
function public:Heal(timer:number)
local self :Healing = self
if (self.Healing == true) then return end
self.Healing = true
--Type 'true' could not be converted into '~true'; type true (true) is not a subtype of ~true.negated() (true) Warning 1
--Type 'true' could not be converted into '~~(false?)'; type true (true) is not a subtype of ~~(false?).negated() (~(false?)) Warning 2
--both warnings comming from self.Healing = true
-- i also don't know why the warning went from ~true to ~~false just reloaded the script
.....
self.Healing = false
--if i change the if statement to not self.Healing
self.Healing = false -- Type 'false' could not be converted into '~(false?)'; type false (false) is not a subtype of ~(false?).negated() (false?)
function new:
local self = setmetatable({}, {__index=module}
self.Healing = false :: boolean
i have met this issue a lot if statements have the power to change the meaning of a variable in some cases it's good but in some other cases it is annoying.
is there a way to go around this or is this a bug?
OverHash
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingnew solverThis issue is specific to the new solver.This issue is specific to the new solver.