Simple tracking scrips
Im making an automatic tracker for an alt with both herbalism and mining! This is my first WoW addon, and got no experience with LUA or wow API before this.
In my LUA code ive got a a function that repeats every 4 seconds, which work perfectly until i login in a rested zone (inn or capital). this is the function: Code:
local function tracking() the way I run the function is: Code:
if IsSpellKnown(2580) and IsSpellKnown(2383) then When I login into the same inn the tracking will not change after leaving the inn and do a /reload Are there any obvious things Ive missed? |
Where's the rest of your code?
|
Other than my .toc file there are nothing else, except a decleration of i, in the global scope.
|
The global space is shared by the entire Blizzard UI and all the 3rd party addons you have installed. Naming a global variable "i" is not a great idea as it's too easy for it to be "trampled" by someone missing a "local" declaration by accident.
Code:
local Mining, Herbing = 2580, 2383 |
ok, i probably misspoke; i declared i as:
Code:
local var i = 0; |
Do you mean this? What you put above is not proper syntax.
Lua Code:
|
All times are GMT -6. The time now is 04:13 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI