Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converted boolean into number in two places to avoid arithmetic on boolean error. #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wixia
Copy link

@wixia wixia commented Aug 25, 2021

I've been using this addon since I found it for TBC Classic and now I got tired of having to hide all the error messages so I made a fix.

DISCLAIMER: I have never coded in LUA before and I have no idea how my fix migh affect other parts of the code. I merely concluded that the error appeared because of an arithmetic operation on a boolean, and the googled "how to convert boolean to number in lua". Works great for me but I have in no way fully tested the fix for all classes/configurations.

fixes #1

@Talimar
Copy link

Talimar commented Apr 15, 2022

I've been using this addon since I found it for TBC Classic and now I got tired of having to hide all the error messages so I made a fix.

DISCLAIMER: I have never coded in LUA before and I have no idea how my fix migh affect other parts of the code. I merely concluded that the error appeared because of an arithmetic operation on a boolean, and the googled "how to convert boolean to number in lua". Works great for me but I have in no way fully tested the fix for all classes/configurations.

fixes #1

Still getting this bug:
1252x Forte_Timer\Forte_Timer.lua:2391: attempt to perform arithmetic on local 't2' (a nil value)
[string "@Forte_Timer\Forte_Timer.lua"]:2391: in function Draw' [string "@Forte_Timer\Forte_Timer.lua"]:1547: in function v'
[string "@Forte_Core\Forte_Core-2.5.1.lua"]:383: in function <Forte_Core\Forte_Core.lua:368>

Locals:
self = {
0 =
index = 1
setValueLinks = defined @Forte_Timer\Forte_Timer.lua:2001
OnBackdropLoaded = defined @SharedXML\Backdrop.lua:239
printLinks = defined @Forte_Timer\Forte_Timer.lua:2010
eraseLinks = defined @Forte_Timer\Forte_Timer.lua:2007
GetBackdropColor = defined @SharedXML\Backdrop.lua:477
groups =

{
}
SetBackdropBorderColor = defined @SharedXML\Backdrop.lua:509
s =
{
}
Draw = defined @Forte_Timer\Forte_Timer.lua:2071
ApplyBackdrop = defined @SharedXML\Backdrop.lua:381
SetBackdrop = defined @SharedXML\Backdrop.lua:416
ClearBackdrop = defined @SharedXML\Backdrop.lua:369
GetBackdropBorderColor = defined @SharedXML\Backdrop.lua:496
GetBackdrop = defined @SharedXML\Backdrop.lua:434
combat_sensitive = false
SetBorderBlendMode = defined @SharedXML\Backdrop.lua:353
removeLink = defined @Forte_Timer\Forte_Timer.lua:1992
Update = defined @Forte_Timer\Forte_Timer.lua:2564
SetupTextureCoordinates = defined @SharedXML\Backdrop.lua:301
OnBackdropSizeChanged = defined @SharedXML\Backdrop.lua:269
HasBackdropInfo = defined @SharedXML\Backdrop.lua:365
rebuildLinks = defined @Forte_Timer\Forte_Timer.lua:2013
GetEdgeSize = defined @SharedXML\Backdrop.lua:275
Init = defined @Forte_Timer\Forte_Timer.lua:2560
instanceof = "Timer"
name = "FX_Timer1"
NewGroup = defined @Forte_Timer\Forte_Timer.lua:1868
addLink = defined @Forte_Timer\Forte_Timer.lua:1985
header = {
}
parent = UIParent {
}
SetupPieceVisuals = defined @SharedXML\Backdrop.lua:333
SetBackdropColor = defined @SharedXML\Backdrop.lua:486
ResetDurationTextSize = defined @Forte_Timer\Forte_Timer.lua:2555
HideTicks = defined @Forte_Timer\Forte_Timer.lua:2546
}
s =
{
TargetDebuff =
{
}
FocusBgColor =
{
}
NoTarget = true
CustomTag =
{
}
Expand = true
HideTime = 2
TargetDebuffOther =
{
}
StacksFont =
{
}
FadeTime = 0.500000
NormalColor =
{
}
Fail =
{
}
y = 164.266632
Blink =
{
}
NormalAlpha = 0.500000
FailTime = 2
Bane =
{
}
GroupID = true
Enchant =
{
}
Buff =
{
}
scale = 1
Crowd =
{
}
TargetColor =
{
}
IconRight = false
Target = true
IgnoreLong = false
ShowID = false
MaximizeName = false
TimeRight = false
Max =
{
}
Backdrop =
{
}
You = true
LabelFlip = false
Font =
{
}
Name = true
Height = 14
Label = false
Enable = true
BarBackgroundAlpha = 0.300000
Time = true
Focus = true
TicksNext = true
CastSparkTickOverlap = true
Texture = "Addons\Raven\Statusbars\Reverso.tga"
HideLonger =
{
}
Spell = false
Spark =
{
}
lock = true
SpacingHeight = 2
IconStacks = true
LabelFont =
{
}
Width = 237
MaxTime =
{
}
CastSparkGCD = true
ExpiredColor =
{
}
NormalBgColor =
{
}
Icon = true
SparkDamage =
{
}
Cooldown =
{
}
RaidDebuffs = true
Other = true
OneMax = true
Curse =
{
}
Flip = false
SelfDebuffOther =
{
}
CooldownOther =
{
}
CastSpark =
{
}
SelfBuffOther =
{
}
UnknownTarget = true
LabelHeight = 18
SelfDebuff =
{
}
Default =
{
}
Space = 2
Background = true
Outwands = true
Channel =
{
}
Filter =
{
}
SelfBuff =
{
}
FocusColor =
{
}
HighlightColor =
{
}
HideLonge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LUA Error Messages when Weapon is enchanted - Forte Unusable
2 participants