Greetings,
the last six months i worked with PQR, rotations and lua code. I created some profiles by my own and for my own, but contributing informations and helpfull questions to this community. All my solutions are PvP Profiles. I work alot with Arena 1 to x, eventchecks e.g. One big problem i have all the time is that my profiles creating errors.
They arent syntax or semantic errors. The Profile works as intended, even when errors are thrown. But after time it seems like my profiles begin to stutter. Some abilites wont be executed and so on until the WOW lua interface stops all actions because of too much errors (random time between 1 to 6 Arena games).
On random Situations, a random addon tries to call a protected function (We all know this kind of errors). As far as my researches go that comes from tainted code.
bu_ba wrote an excelent definition of that phenomenon:
NOW I WANT TO KNOW WHAT KIND OF CODE CAUSE INSECURE CODE!
I list what kind of actions i use and maybe someone cann help me finding that nasty bitch code (sry for that - but looking for so lang, asked a thousand people).
- Complex Button Checks - MyFearKey = IsMouseButtonDown(4) and not IsLeftControlKeyDown()
- Unique Global Variables (Buttons / Settings e.g)
- No PQI Implementation
- Table of Group members (Sheuron Engine <3)
- Checks of nil values (If UnitBuffID("player", 130857) == nil)
- Dynamic Table access with _G -> auraTables = _G["AURA_" .. string.upper(auraType)]
- Cancel Buffs by using -> CancelUnitBuff("player", GetSpellInfo(81206))
- get Spell cooldown -> select(2,GetSpellCooldown(527))
- counting through members -> for i=1,#members do
- counting through arena enemies -> for i=1, benNumberEnemies do -- A global var!
- all Casts are: CastSpellByName(GetSpellInfo(14914),"arena"..i) like
- I dont use The ability Setings box in the editor (recast delay 0 / spell id 0)
- checking talents by: fadeTalent = select(5,GetTalentInfo(6))
- checking buffs: local fdcl,_,_,Stacks,_,_,fdclTime = UnitBuffID("player",109186) or 0
- Using Items: UseItemByName(select(1,GetItemInfo(5512)), "player")
- checking the most injured member by: members[1].HP
- Time based actions like: ( GetTime() - lastFocusSwap ) > 15
- Checks if spell is casted with: ipairs(InterruptSpells)
- Using: SpellStopCasting()
- Handling Instants with event handler
- Checking Creature Type: if UnitCreatureType("target") == "Undead" then
- dot/hot expiration time: [I]SpellExpire = select(7, UnitBuffID(members.Unit,139)) or 0
last but not least the only place where i use macros
- RunMacroText("/target Psyfiend")
- RunMacroText("/cast Power Word: Shield")
- RunMacroText("/petaggressive")
- RunMacroText("/petattack")
Please help me =(