GFreak45
I didnt slap you, i high 5'd your face.
- Reaction score
- 130
Ok so heres the errors and i will put a commented arrow pointing to each line they reference:
As always, thanks for any help you can provide and +rep for all those who help (if i have spread it around enough)
- Expected a name
- Expected 'endloop'
- Expected a name
- Expected a name
- Expected a name
- Expected a name
- Expected a name
JASS:
//TESH.scrollpos=181
//TESH.alwaysfold=0
//The following functions are configure-able, you can change the value after the line that reads: return (something)
//you can change (something) to whatever you want if it matches the type that is already there, at the end of the function
//line: function Name takes nothing returns something, something is the type of return, make sure if you change this u
//change it to a value comparable
//================================================================================
//========================== GCB Configure-able Options ==========================
//================================================================================
function GCB_Defaults_Interval takes nothing returns real
return 0.04
endfunction
//change this to what you want the refresh rate in seconds to be to be
function GCB_Defaults_Zoffset takes nothing returns real
return -5.0
endfunction
//change this to what you want the z offset to be
function GCB_Defaults_Xoffset takes nothing returns real
return -20.0
endfunction
//change this to what you want the x offset to be
function GCB_Defaults_Size takes nothing returns real
return 7.0
endfunction
//change this to the real number you want the size of the castbar to be, this is best relatively low to keep any spaces minimal
function GCB_Defaults_Symbol takes nothing returns string
return "|"
endfunction
//change this to what symbol you want the cast bar to be made up of, recommended: , . | [ ] '
function GCB_Defaults_CastBar_Length takes nothing returns integer
return 40
endfunction
//change this to how many digits you want the string to have, higher numbers are better if under ~80
function GCB_Defaults_Incomplete_NoChannel_Color takes nothing returns string
return "c1ffc1"
endfunction
//change this to the color code you want to use for any incomplete, non channeling castbars
function GCB_Defaults_Complete_NoChannel_Color takes nothing returns string
return "00ff00"
endfunction
//change this to the color code you want to use for any complete parts of non channeling castbars
function GCB_Defaults_Incomplete_Channel_Color takes nothing returns string
return "c1c1ff"
endfunction
//change this to the color code you want to use for any incomplete, channeling castbars
function GCB_Defaults_Complete_Channel_Color takes nothing returns string
return "0000ff"
endfunction
//change this to the color code you want to use for any complete parts of channeling castbars
function GCB_Defaults_Incomplete_Negative_Color takes nothing returns string
return "ffc1c1"
endfunction
//change this to the color code you want to use for any incomplete, negative castbars
function GCB_Defaults_Complete_Negative_Color takes nothing returns string
return "ff0000"
endfunction
//change this to the color code you want to use for any complete parts of negative castbars
function GCB_Default_CastTime takes nothing returns real
return 2.0
endfunction
//this is the default cast time of any non-set castbars
function GCB_Default_Channeling takes nothing returns boolean
return false
endfunction
//this is the default true/false of whether or not the cast is a boolean, if its true it will show up as a cast in the castbar
function GCB_OrderFilter takes nothing returns boolean
local integer this = LoadInteger(udg_GCB_Hashtable, StringHash("GCB_Previous"), 0)
loop
exitwhen this == 0
if LoadUnit(udg_GCB_Hashtable, StringHash("GCB_Unit"), this) == GetTriggerUnit() and not (LoadBoolean(udg_GCB_Hashtable, StringHash("GCB_Negative"), this) or LoadBoolean(udg_GCB_Hashtable, StringHash("GCB_New"), this)) then //<------------------------------------------------------------------------------------------#1
call SaveBoolean(udg_GCB_Hashtable, StringHash("GCB_Order"), this, true)
endif //<---------------------------------------------------------------------------------------------------------#2
set this = LoadInteger(udg_GCB_Hashtable, StringHash("GCB_Previous"), this)
endloop
return false
endfunction
function GCB_Periodic takes nothing returns nothing
local integer this = LoadInteger(udg_GCB_Hashtable, StringHash("GCB_Previous"), 0)
local integer i
local string a
local string b
loop
exitwhen this == 0
if LoadBoolean(udg_GCB_Hashtable, StringHash("GCB_Order"), this) or LoadReal(udg_GCB_Hashtable, StringHash("GCB_TimeCompleted"), this) >= LoadReal(udg_GCB_Hashtable, StringHash("GCB_TimeMax"), this) then
call SaveBoolean(udg_GCB_Hashtable, StringHash("GCB_Order"), this, false)
call SaveReal(udg_GCB_Hashtable, StringHash("GCB_TimeComplete"), this, LoadReal(udg_GCB_Hashtable, StringHash("GCB_TimeComplete"), this) + GCB_Defaults_Interval())
set i = R2I(LoadReal(udg_GCB_Hashtable, StringHash("GCB_TimeComplete"), this) / LoadReal(udg_GCB_Hashtable, StringHash("GCB_TimeMax"), this))
set a = LoadString(udg_GCB_Hashtable, StringHash("GCB_String"), 0) <-------------------------------------------------------------------------------------------------#3
set b = a
set a = SubString(a, 0, i - 1)
set b = SubString(a, i, GCB_Defaults_CastBar_Length() - 1)
if not (LoadBoolean(udg_GCB_Hashtable, StringHash("GCB_Channeling"), this) or LoadBoolean(udg_GCB_Hashtable, StringHash("GCB_Negative"), this)) then
set a = "|cff" + GCB_Defaults_Complete_NoChannel_Color() + a + "|r|cff" + GCB_Defaults_Incomplete_NoChannel_Color() + b
elseif LoadBoolean(udg_GCB_Hashtable, StringHash("GCB_Channeling"), this) and not LoadBoolean(udg_GCB_Hashtable, StringHash("GCB_Negative"), this) then
set a = "|cff" + GCB_Defaults_Incomplete_Channel_Color() + b + "|r|cff" + GCB_Defaults_Complete_Channel_Color() + a
elseif LoadBoolean(udg_GCB_Hashtable, StringHash("GCB_Negative"), this) then
set a = "|cff" + GCB_Defaults_Complete_Negative_Color() + a + "|r|cff" + GCB_Defaults_Incomplete_Negative_Color() + b
else
set a = "|cff" + GCB_Defaults_Incomplete_Negative_Color() + b + "|r|cff" + GCB_Defaults_Complete_Negative_Color() + a
endif
set bj_lastCreatedTextTag = CreateTextTag()
call SetTextTagText(bj_lastCreatedTextTag, a, GCB_Defaults_Size() * 0.023 / 10)
if LoadBoolean(udg_GCB_Hashtable, StringHash("GCB_Negative"), this) then
call SetTextTagPos(bj_lastCreatedTextTag, GetUnitX(LoadUnit(udg_GCB_Hashtable, StringHash("GCB_Unit"), this) - GCB_Defaults_Xoffset()), GetUnitY(LoadUnitudg_GCB_Hashtable, (StringHash("GCB_Unit"), this)), ((GCB_Defaults_Zoffset() - GCB_Defaults_Size()) - 3)) //<------------------------------------------------------------------------------------#4
else
call SetTextTagPos(bj_lastCreatedTextTag, GetUnitX(LoadUnit(udg_GCB_Hashtable, StringHash("GCB_Unit"), this) - GCB_Defaults_Xoffset()), GetUnitY(LoadUnitudg_GCB_Hashtable, (StringHash("GCB_Unit"), this)), GCB_Defaults_Zoffset()) //<----------------------------------------------------------------------------------------------------------------#5
endif
call SetTextTagLifespan(bj_lastCreatedTextTag, GCB_Defaults_Interval() + 0.01)
set this = LoadInteger(udg_GCB_Hashtable, StringHash("GCB_Previous"), this)
else
set udg_GCB_Triggering_Unit = LoadUnit(udg_GCB_Hashtable, StringHash("GCB_Unit"), this) //<------------------------------------------------------------------------------------------------------------------#6
set udg_GCB_Positive = not LoadBoolean(udg_GCB_Hashtable, StringHash("GCB_Negative"), this)
if LoadReal(udg_GCB_Hashtable, StringHash("GCB_TimeCompleted"), this) >= LoadReal(udg_GCB_Hashtable, StringHash("GCB_TimeMax"), this) then
set udg_GCB_Time = LoadReal(udg_GCB_Hashtable, StringHash("GCB_TimeMax"), this)
set udg_GCB_Completed = true
else
set udg_GCB_Time = LoadReal(udg_GCB_Hashtable, StringHash("GCB_TimeCompleted"), this)
set udg_GCB_Completed = false
endif
set this = LoadInteger(udg_GCB_Hashtable, StringHash("GCB_Previous"), this)
call SaveInteger(udg_GCB_Hashtable, StringHash("GCB_Next"), this, LoadInteger(udg_GCB_Hashtable, StringHash("GCB_Next"), LoadInteger(udg_GCB_Hashtable, StringHash("GCB_Next"), this)))
call SaveInteger(udg_GCB_Hashtable, StringHash("GCB_Previous"), LoadInteger(udg_GCB_Hashtable, StringHash("GCB_Next"), this), this)
endif
endloop
set a = null
set b = null
endfunction
//==============================================================
//==================== CastBar Registration ====================
//==============================================================
function GCB_LinkNewBar takes nothing returns nothing
local integer allocated = LoadInteger(udg_GCB_Hashtable, StringHash("GCB_RecycleList"), 0)
if allocated == 0 then
if LoadInteger(udg_GCB_Hashtable, StringHash("GCB_RecycleList"), 0) == 0 then
call SaveInteger(udg_GCB_Hashtable, StringHash("GCB_ListSize"), 0, LoadInteger(udg_GCB_Hashtable, StringHash("GCB_ListSize"), 0) + 1 )
set allocated = LoadInteger(udg_GCB_Hashtable, StringHash("GCB_ListSize"), 0)
else
call BJDebugMsg("GCB ERROR: You have more than 8190 castbars running at once.")
set allocated = 0
endif
else
call SaveInteger(udg_GCB_Hashtable, StringHash("GCB_RecycleList"), 0, LoadInteger(udg_GCB_Hashtable, StringHash("GCB_RecycleList"), allocated))
call SaveInteger(udg_GCB_Hashtable, StringHash("GCB_RecycleList"), allocated, 0)
endif
call SaveInteger(udg_GCB_Hashtable, StringHash("GCB_Next"), allocated, 0)
call SaveInteger(udg_GCB_Hashtable, StringHash("GCB_Previous"), allocated, LoadInteger(udg_GCB_Hashtable, StringHash("GCB_Previous"), 0))
call SaveInteger(udg_GCB_Hashtable, StringHash("GCB_Previous"), 0, allocated)
call SaveInteger(udg_GCB_Hashtable, StringHash("GCB_Next"), LoadInteger(udg_GCB_Hashtable, StringHash("GCB_Previous"), allocated), allocated)
call SaveReal(udg_GCB_Hashtable, StringHash("GCB_TimeMax"), allocated,udg_GCB_Time)
call SaveUnitHandle(udg_GCB_Hashtable, StringHash("GCB_Unit"), allocated, udg_GCB_Caster)
call SaveBoolean(udg_GCB_Hashtable, StringHash("GCB_Channeling"), allocated, udg_GCB_Channeling)
call SaveBoolean(udg_GCB_Hashtable, StringHash("GCB_Negative"), allocated, udg_GCB_Negative_Cast)
call SaveBoolean(udg_GCB_Hashtable, StringHash("GCB_New"), allocated, true)
call SaveBoolean(udg_GCB_Hashtable, StringHash("GCB_Order"), this, false) //<--------------------------------------------------------------------------------------------------------------------------#7
if udg_GCB_Target != null and (not udg_GCB_Positive_Cast) then
set udg_GCB_Caster = udg_GCB_Target
set udg_GCB_Target = null
set udg_GCB_Negative_Cast = true
call GCB_LinkNewBar()
set udg_GCB_Negative_Cast = false
else
set udg_GCB_Caster = udg_GCB_Target
set udg_GCB_Target = null
set udg_GCB_Negative_Cast = false
call GCB_LinkNewBar()
endif
set udg_GCB_Caster = null
set udg_GCB_Target = null
set udg_GCB_Time = GCB_Default_CastTime()
set udg_GCB_Channeling = GCB_Default_Channeling()
endfunction
function InitTrig_GCB takes nothing returns nothing
local trigger trig = CreateTrigger()
local timer t = CreateTimer()
set gg_trg_GCB = CreateTrigger( )
call TriggerAddCondition(gg_trg_GCB, Filter(function GCB_LinkNewBar))
call TimerStart(t, GCB_Defaults_Interval(), true, function GCB_Periodic)
call TriggerAddCondition(trig, Filter(function GCB_OrderFilter))
set t = null
endfunction
As always, thanks for any help you can provide and +rep for all those who help (if i have spread it around enough)