WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Help comparison tables (https://www.wowinterface.com/forums/showthread.php?t=55616)

Mortimerlol 07-31-17 07:58 AM

Help comparison tables
 
I have this code:
Lua Code:
  1. local BangDB = CreateFrame("FRAME");
  2. BangDB:RegisterEvent("ADDON_LOADED");
  3. BangDB:RegisterEvent("PLAYER_ENTERING_WORLD");
  4.  
  5. local function eventHandler(self, event, ...)
  6.     if event == "ADDON_LOADED" and ... == "Bang_Bang" then
  7.         if not BangCharKills then BangCharKills = {} end
  8.         if not BangCharHateds then BangCharHateds = {} end
  9.  
  10.         self:UnregisterEvent("ADDON_LOADED");
  11.     end
  12.  
  13. -- SORT TABLE A BY NAMES - format{ ["Name"] = true, ["Nametwo"] = true, ... }
  14. local hates = {}
  15.     for k in pairs(BangCharHateds) do hates[#hates + 1] = k end
  16.         table.sort(hates)
  17.     for i = 1, #hates do print(hates[i]) end
  18.  
  19. -- SORT TABLE B BY KILLS, NAMES - format{ ["Name"] = 12, ["Nametwo"] = 5, ... }
  20. function spairs(BangCharKills, order)
  21.     local tokills = {}
  22.     for k in pairs(BangCharKills) do tokills[#tokills + 1] = k end
  23.     if order then
  24.         table.sort(tokills, function(a,b) return order(BangCharKills, a, b) end)
  25.     else
  26.         table.sort(tokills)
  27.     end
  28.     local i = 0
  29.     return function()
  30.         i = i + 1
  31.         --testing with:
  32.         --if tokills[i] == hates[i] then -- doesn't works
  33.         --if BangCharKills[tokills[i]] == hates[i] then -- doesn't works
  34.         if tokills[i] then
  35.             return tokills[i], BangCharKills[tokills[i]]
  36.         end
  37.     end
  38. end
  39.     for k,v in spairs(BangCharKills, function(BangCharKills,a,b) return BangCharKills[b] < BangCharKills[a] end) do
  40.         print(v, k)
  41.     end
  42. end
  43. BangDB:SetScript("OnEvent", eventHandler);
All works fine but now I need sort TABLE B with (number, name) but if name is in TABLE A...

Thanks for help!

Mortimerlol 08-03-17 07:52 AM

I can't get a positive code, somebody have an idea?

Banknorris 08-03-17 03:25 PM

Not sure if it is me but I have no clue what you really want to do. Could you explain better, I guess this is the reason you got no answers yet.

briskman3000 08-03-17 07:29 PM

I'm not 100% sure either.

My best guess would be that he wants to sort the values in Table B, by whether or not the value in [NAME] in Table B exists in [NAME] in Table A.

Mortimerlol 08-03-17 10:25 PM

Sry for my bad english.

My code prints sort table b by values, now i need sort same but if name exists in table a, table a dont have numeric values (have true or false).

Banknorris 08-04-17 01:40 AM

Code:

local tableC = {}
for k,v in pairs(tableB)
        if tableA[v] then
                tableC[k] = v
        end
end
table.sort(tableC)


Mortimerlol 08-04-17 06:00 AM

Quote:

Originally Posted by Banknorris (Post 324485)
Code:

local tableC = {}
for k,v in pairs(tableB)
        if tableA[v] then
                tableC[k] = v
        end
end
table.sort(tableC)


Thanks for reply!

I trying with ur code and cant be good. :(
Lua Code:
  1. local tableC = {}
  2. for k,v in pairs(BangCharKills) do tableC[#tableC + 1] = k end
  3.     if hates[v] then
  4.         tableC[k] = v
  5.     end
  6. table.sort(tableC)
  7.     --for i = 1, #tableC do print(tableC[i]) end
  8.     print(tableC[1])
  9. end

Mortimerlol 08-04-17 12:28 PM

Sorry for my english. I go to explain in code text, i hope that now you understand me:

Lua Code:
  1. BangCharHateds = {
  2.     ["Paco"] = true,
  3.     ["Anabel"] = true,
  4.     ["Francisco"] = true,
  5.  }
  6.   BangCharKills = {
  7.     ["Tarmanu"] = 43,
  8.     ["Anabel"] = 56,
  9.     ["Armario"] = 23,
  10.     ["Paco"] = 10,
  11.     ["Francisco"] = 11,
  12.     ["Casiopea"] = 22,
  13.     ["Artamundo"] = 16,
  14.     ["Costera"] = 7,
  15.  }
  16.  
  17. --  OUTPUT:
  18.  
  19. --  56 Anabel
  20. --  11 Francisco
  21. --  10 Paco

Thanks for help !!!!!!!!

Kakjens 08-04-17 01:15 PM

Quote:

Originally Posted by Mortimerlol (Post 324486)
Thanks for reply!

I trying with ur code and cant be good. :(
Lua Code:
  1. local tableC = {}
  2. for k,v in pairs(BangCharKills) do tableC[#tableC + 1] = k end
  3.     if hates[v] then
  4.         tableC[k] = v
  5.     end
  6. table.sort(tableC)
  7.     --for i = 1, #tableC do print(tableC[i]) end
  8.     print(tableC[1])
  9. end

Thanks for providing input and expected output.
I don't understand how did you derive your code from example of Banknorris.
Why
Code:

tableC[#tableC + 1] = k end
in line 2 is required? Why there's "end" in line 9 instead of being after line 5?
You'll probably want to use your specialized sorting instead of table.sort.
Do you use notepad for writing, or some dedicated script editor (semi-random indentation doesn't help)?

Mortimerlol 08-04-17 01:21 PM

Quote:

Originally Posted by Kakjens (Post 324491)
Thanks for providing input and expected output.
I don't understand how did you derive your code from example of Banknorris.
Why
Code:

tableC[#tableC + 1] = k end
in line 2 is required? Why there's "end" in line 9 instead of being after line 5?
You'll probably want to use your specialized sorting instead of table.sort.
Do you use notepad for writing, or some dedicated script editor (semi-random indentation doesn't help)?

I was testing, bad copy/paste. Yes, i use Notepad++...

Mortimerlol 08-06-17 12:36 AM

Need it only to close my addon, some suggestion? THANKS!

Ketho 08-06-17 04:32 PM

I have no idea what you're trying to do

Banknorris 08-06-17 08:31 PM

Lua Code:
  1. local BangCharHateds = {
  2.     ["Paco"] = true,
  3.     ["Anabel"] = true,
  4.     ["Francisco"] = true,
  5. }
  6.  
  7. local BangCharKills = {
  8.     ["Tarmanu"] = 43,
  9.     ["Anabel"] = 56,
  10.     ["Armario"] = 23,
  11.     ["Paco"] = 10,
  12.     ["Francisco"] = 11,
  13.     ["Casiopea"] = 22,
  14.     ["Artamundo"] = 16,
  15.     ["Costera"] = 7,
  16. }
  17.  
  18. local names = {}
  19. local numbers = {}
  20.  
  21. for char_name,number_of_kills in pairs(BangCharKills) do
  22.     if BangCharHateds[char_name] then
  23.         if not names[number_of_kills] then
  24.             numbers[#numbers+1] = number_of_kills
  25.             names[number_of_kills] = {char_name}
  26.         else
  27.             names[number_of_kills][#names[number_of_kills]+1] = char_name
  28.         end
  29.     end
  30. end
  31.  
  32. table.sort(numbers)
  33. for i=#numbers,1,-1 do
  34.     table.sort(names[numbers[i]])
  35.     for j=1,#names[numbers[i]] do
  36.         print(numbers[i],names[numbers[i]][j])
  37.     end
  38. end

Mortimerlol 08-07-17 12:05 AM

Ohhhhhhhhh excelent work :D :D
Thanks u so much Banknorris :) :) :) :) :)

Mortimerlol 08-07-17 12:33 AM

Reading from my saved variables not limit to total names compared and repeat names... if find 4 names do:

numbers1 names1
numbers2 names2
numbers3 names3
numbers4 names4
numbers1 names1
numbers2 names2
numbers3 names3
numbers4 names4
...the result is fine but very repeat.

And I cant do:
Lua Code:
  1. print("TOP 1: "..numbers[1].." - "..names[1])
  2. print("TOP 2: "..numbers[2].." - "..names[2])
  3. print("TOP 3: "..numbers[3].." - "..names[3])

Thanks u all one more time :o

Kakjens 08-07-17 04:07 AM

In provided code I don't see the reason for repeated printing.
You can add a variable to count how many times you have printed and with the help of it exit the loops.
P.S. I am crying.

Mortimerlol 08-07-17 05:11 AM

Ok, I was doing bad. Now not do loop...
Lua Code:
  1. function hTops()
  2.     local names = {}
  3.     local numbers = {}
  4.      
  5.     for char_name,number_of_kills in pairs(BangKills) do
  6.         if BangHateds[char_name] then
  7.             if not names[number_of_kills] then
  8.                 numbers[#numbers+1] = number_of_kills
  9.                 names[number_of_kills] = {char_name}
  10.             else
  11.                 names[number_of_kills][#names[number_of_kills]+1] = char_name
  12.             end
  13.         end
  14.     end
  15.      
  16.     table.sort(numbers)
  17.     for i=#numbers,1,-1 do
  18.         table.sort(names[numbers[i]])
  19.  
  20.         for j=1,#names[numbers[i]] do
  21.           --  print(numbers[1],names[numbers[1]][1])
  22.         print(numbers[i],names[numbers[i]][j])
  23.            
  24.         end
  25.     end
  26. end
Now trying print line per line.

Mortimerlol 08-07-17 06:49 AM

[solved]
 
Well, now is done!

Lua Code:
  1. table.sort(numbers, function(a,b)
  2.     return b < a
  3. end)
  4.  
  5. for i=1,1, -1 do
  6.     for j=1,1 do
  7.         --foreach(numbers, print)
  8.         print("TOP 1: "..numbers[1], names[numbers[1]][j])
  9.         print("TOP 2: "..numbers[2], names[numbers[2]][j])
  10.         print("TOP 3: "..numbers[3], names[numbers[3]][j])
  11.     end
  12. end

Thanks Banknorris for help me.

pas06 08-07-17 07:01 AM

what is this outer for loop good for?

Kakjens 08-07-17 07:11 AM

pas06, both for loops are strange.
Mortimerlol, make Paco, Anabel and Francisco have the same number of kills, and test what happens.

Mortimerlol 08-07-17 07:58 AM

Quote:

Originally Posted by Kakjens (Post 324545)
pas06, both for loops are strange.
Mortimerlol, make Paco, Anabel and Francisco have the same number of kills, and test what happens.

Only print one name if have same kills :(

Banknorris 08-07-17 11:23 AM

Quote:

Originally Posted by Mortimerlol (Post 324546)
Only print one name if have same kills :(

Weird, I just tested my code by setting 10 kills for Paco, Anabel and Francisco and it showed the three names corretly.

My guess is that you did something wrong in the adaptation.

Mortimerlol 08-07-17 12:06 PM

I go to check then, sry.

Mortimerlol 08-07-17 12:16 PM

no good values, i dont understand :(
Lua Code:
  1. table.sort(numbers)
  2. for i=#numbers,1,-1 do
  3.     table.sort(names[numbers[i]])
  4.     for j=1,#names[numbers[i]] do
  5.         print(numbers[1],names[numbers[1]][j])
  6.         print(numbers[2],names[numbers[2]][j])
  7.     end
  8. end

Mortimerlol 08-07-17 12:26 PM

Your code woks but I dont understand why I can't print line per line, as for example:

Lua Code:
  1. print("TOP 1: "..numbers[1], names[numbers[1]][1])
  2.         print("TOP 2: "..numbers[2], names[numbers[2]][2])
  3.         print("TOP 3: "..numbers[3], names[numbers[3]][3])

I dont see that I do wrong.

Kakjens 08-07-17 12:46 PM

That's because sorted table has different structure - there's an extra dimension.
Code:

local which = 0
table.sort(numbers)
for i=#numbers,1,-1 do
    table.sort(names[numbers[i]])
    for j=1,#names[numbers[i]] do
        which = which +1
        print("TOP",which,": "..numbers[i], names[numbers[i]][j])
    end
end

Figure yourself how to stop printing.

Mortimerlol 08-07-17 01:17 PM

yes but, i need line per line but with 1, 2, 3, 4:

Lua Code:
  1. Gui.func1frame.htopkills2:AddMessage("BANGS", 1, .8, 0, 1)
  2.         if numbers[1] then
  3.             Gui.func1frame.htopkills2:AddMessage(numbers[1], 0, .8, 0, 1)
  4.         else
  5.             Gui.func1frame.htopkills2:AddMessage("0", 0, .8, 0, 1)
  6.         end
  7.                 if numbers[2] then
  8.             Gui.func1frame.htopkills2:AddMessage(numbers[2], 0, .8, 0, 1)
  9.         else
  10.             Gui.func1frame.htopkills2:AddMessage("0", 0, .8, 0, 1)
  11.         end
  12.                         if numbers[3] then
  13.             Gui.func1frame.htopkills2:AddMessage(numbers[3], 0, .8, 0, 1)
  14.         else
  15.             Gui.func1frame.htopkills2:AddMessage("0", 0, .8, 0, 1)
  16.         end
  17. --......
  18.         if names[numbers[1]][j] then
  19.             Gui.func1frame.htopkills4:AddMessage(names[numbers[1]][j], .9, .9, .9, 1)
  20.         else
  21.             Gui.func1frame.htopkills4:AddMessage("0", .9, .9, .9, 1)
  22.         end
  23.                 if names[numbers[2]][j] then
  24.             Gui.func1frame.htopkills4:AddMessage(names[numbers[2]][j], .7, .7, .7, 1)
  25.         else
  26.             Gui.func1frame.htopkills4:AddMessage("0", .7, .7, .7, 1)
  27.         end
  28.         if names[numbers[3]][j] then
  29.             Gui.func1frame.htopkills4:AddMessage(names[numbers[3]][j], .6, .6, .6, 1)
  30.         else
  31.             Gui.func1frame.htopkills4:AddMessage("0", .6, .6, .6, 1)
  32.         end

Mortimerlol 08-07-17 01:19 PM

I only need can do:

Lua Code:
  1. print("TOP 1: "..numbers[1111111], names[numbers[1111111]][11111111])
  2.        -----blablabla
  3.         print("TOP 2: "..numbers[22222], names[numbers[2222]][222222])

Mortimerlol 08-07-17 01:24 PM

Yeah, now works as like/need. THANKS !

Lua Code:
  1. if which == 1 then print("TOP 1"..numbers[i], names[numbers[i]][j]) end
  2.         if which == 2 then print("TOP 2"..numbers[i], names[numbers[i]][j]) end
  3.         if which == 3 then print("TOP 3"..numbers[i], names[numbers[i]][j]) end
  4.         if which == 4 then print("TOP 4"..numbers[i], names[numbers[i]][j]) end

Mortimerlol 08-07-17 01:39 PM

no, no works, im crazy with it :mad:

Kakjens 08-07-17 01:58 PM

Quote:

Originally Posted by Mortimerlol (Post 324569)
no, no works, im crazy with it :mad:

Pasting more code to see the context would help.

Mortimerlol 08-07-17 02:04 PM

Thanks...

Lua Code:
  1. function hTops()
  2.     local names = {}
  3.     local numbers = {}
  4.      
  5.     for char_name,number_of_kills in pairs(BangKills) do
  6.         if BangHateds[char_name] then
  7.             if not names[number_of_kills] then
  8.                 numbers[#numbers+1] = number_of_kills
  9.                 names[number_of_kills] = {char_name}
  10.             else
  11.                 names[number_of_kills][#names[number_of_kills]+1] = char_name
  12.             end
  13.         end
  14.     end
  15.  
  16. table.sort(numbers, function(a,b)
  17.     return b < a
  18. end)
  19.  
  20. for i=1,1, -1 do
  21. for j=1,1 do
  22.  
  23.     --foreach(numbers, print)
  24. Gui.func1frame.htopkills1 = CreateFrame("MessageFrame", nil, Gui.func1frame)
  25. Gui.func1frame.htopkills1:SetSize(50,100)
  26. Gui.func1frame.htopkills1:SetPoint("TOP", -110, 40)
  27. Gui.func1frame.htopkills1:SetFont("Fonts\\FRIZQT__.ttf", 12, "THINOUTLINE")
  28. Gui.func1frame.htopkills1:SetFading(false)
  29. Gui.func1frame.htopkills1:SetSpacing(0)
  30. Gui.func1frame.htopkills1:SetJustifyH("CENTER")
  31. Gui.func1frame.htopkills1:AddMessage("TOP ", 1, .8, 0, 1)
  32. Gui.func1frame.htopkills1:AddMessage("#1", 1, .7, .05, 1)
  33. Gui.func1frame.htopkills1:AddMessage("#2", .65, .65, .65, 1)
  34. Gui.func1frame.htopkills1:AddMessage("#3", .6, .35, 0, 1)
  35. --
  36. Gui.func1frame.htopkills2 = CreateFrame("MessageFrame", nil, Gui.func1frame)
  37. Gui.func1frame.htopkills2:SetSize(50,100)
  38. Gui.func1frame.htopkills2:SetPoint("TOP", -60, 40)
  39. Gui.func1frame.htopkills2:SetFont("Fonts\\FRIZQT__.ttf", 12, "THINOUTLINE")
  40. Gui.func1frame.htopkills2:SetFading(false)
  41. Gui.func1frame.htopkills2:SetSpacing(0)
  42. Gui.func1frame.htopkills2:SetJustifyH("CENTER")
  43. Gui.func1frame.htopkills2:AddMessage("BANGS", 1, .8, 0, 1)
  44.         if numbers[1] then
  45.             Gui.func1frame.htopkills2:AddMessage(numbers[1], 0, .8, 0, 1)
  46.         else
  47.             Gui.func1frame.htopkills2:AddMessage("0", 0, .8, 0, 1)
  48.         end
  49.         if numbers[2] then
  50.             Gui.func1frame.htopkills2:AddMessage(numbers[2], 0, .8, 0, 1)
  51.         else
  52.             Gui.func1frame.htopkills2:AddMessage("0", 0, .8, 0, 1)
  53.         end
  54.         if numbers[3] then
  55.             Gui.func1frame.htopkills2:AddMessage(numbers[3], 0, .8, 0, 1)
  56.         else
  57.             Gui.func1frame.htopkills2:AddMessage("0", 0, .8, 0, 1)
  58.         end
  59. --
  60. Gui.func1frame.htopkills3 = CreateFrame("MessageFrame", nil, Gui.func1frame)
  61. Gui.func1frame.htopkills3:SetSize(50,100)
  62. Gui.func1frame.htopkills3:SetPoint("TOP", 0, 40)
  63. Gui.func1frame.htopkills3:SetFont("Fonts\\FRIZQT__.ttf", 12, "THINOUTLINE")
  64. Gui.func1frame.htopkills3:SetFading(false)
  65. Gui.func1frame.htopkills3:SetSpacing(0)
  66. Gui.func1frame.htopkills3:SetJustifyH("CENTER")
  67. Gui.func1frame.htopkills3:AddMessage("DEATHS", 1, .8, 0, 1)
  68.         if BangDeaths[names[numbers[1]][j]] then
  69.             Gui.func1frame.htopkills3:AddMessage(BangDeaths[names[numbers[1]][j]], .8, 0, 0, 1)
  70.         else
  71.             Gui.func1frame.htopkills3:AddMessage("0", .8, 0, 0, 1)
  72.         end
  73.         if BangDeaths[names[numbers[2]][j]] then
  74.             Gui.func1frame.htopkills3:AddMessage(BangDeaths[names[numbers[2]][j]], .8, 0, 0, 1)
  75.         else
  76.             Gui.func1frame.htopkills3:AddMessage("0", .8, 0, 0, 1)
  77.         end
  78.         if BangDeaths[names[numbers[3]][j]] then
  79.             Gui.func1frame.htopkills3:AddMessage(BangDeaths[names[numbers[3]][j]], .8, 0, 0, 1)
  80.         else
  81.             Gui.func1frame.htopkills3:AddMessage("0", .8, 0, 0, 1)
  82.         end
  83. --
  84. Gui.func1frame.htopkills4 = CreateFrame("MessageFrame", nil, Gui.func1frame)
  85. Gui.func1frame.htopkills4:SetSize(250,100)
  86. Gui.func1frame.htopkills4:SetPoint("TOP", 165, 40)
  87. Gui.func1frame.htopkills4:SetFont("Fonts\\FRIZQT__.ttf", 12, "THINOUTLINE")
  88. Gui.func1frame.htopkills4:SetFading(false)
  89. Gui.func1frame.htopkills4:SetSpacing(0)
  90. Gui.func1frame.htopkills4:SetJustifyH("LEFT")
  91. Gui.func1frame.htopkills4:AddMessage("WANTED NAME", 1, .8, 0, 1)
  92.         if names[numbers[1]][j] then
  93.             Gui.func1frame.htopkills4:AddMessage(names[numbers[1]][j], .9, .9, .9, 1)
  94.         else
  95.             Gui.func1frame.htopkills4:AddMessage("0", .9, .9, .9, 1)
  96.         end
  97.         if names[numbers[2]][j] then
  98.             Gui.func1frame.htopkills4:AddMessage(names[numbers[2]][j], .7, .7, .7, 1)
  99.         else
  100.             Gui.func1frame.htopkills4:AddMessage("0", .7, .7, .7, 1)
  101.         end
  102.         if names[numbers[3]][j] then
  103.             Gui.func1frame.htopkills4:AddMessage(names[numbers[3]][j], .6, .6, .6, 1)
  104.         else
  105.             Gui.func1frame.htopkills4:AddMessage("0", .6, .6, .6, 1)
  106.         end
  107. end
  108. end
  109. end

Ketho 08-07-17 02:32 PM

Quote:

Originally Posted by Kakjens (Post 324541)
P.S. I am crying.

I-I'd have to reinstall wow after using that addon


Mortimerlol 08-07-17 02:42 PM

¬.¬ ¬.¬ ¬.¬ ¬.¬ ¬.¬

Banknorris 08-07-17 03:06 PM

What I can do is to explain my code. I will use this data

local BangCharHateds = {
["Paco"] = true,
["Anabel"] = true,
["Francisco"] = true,
}

local BangCharKills = {
["Tarmanu"] = 43,
["Anabel"] = 56,
["Armario"] = 23,
["Paco"] = 56,
["Francisco"] = 11,
["Casiopea"] = 22,
["Artamundo"] = 16,
["Costera"] = 7,
}


numbers
This is an array.
Hence keys are 1,2,3,...
#numbers is the number of DISTINCT kill counts

numbers[1] = 56
numbers[2] = 11

names
This is a hash table.
keys are kills counts
values are arrays of all names with that kill count

names = {} --hash table

names[56] = {} --array
names[56][1] = "Anabel"
names[56][2] = "Paco"

name[11] = {} --array
name[11][1] = {"Francisco"}

So my loops were traversing numbers in decrescent order and then for each number looping through all names, then going to the next highest kill count, listing all names with the kill count and so on.

MunkDev 08-07-17 06:47 PM

I downloaded Bang Bang! just to check it out and the design is simply atrocious. Ever heard of local variables?
Because it's basically 100% spaghetti coded you must be using a ton of memory compared to what you should be using for a mod like this.

Also, why would you put a Sell Junk button in an addon aimed towards recounting your PvP activity?
Lua Code:
  1. -- found in core.lua
  2. function VENDER()
  3.     total = 0
  4.     for bolsos = 0,4 do
  5.         for huecos = 1, GetContainerNumSlots(bolsos) do
  6.             producto = GetContainerItemLink(bolsos, huecos)
  7.                 if producto then
  8.                     _, _, raro, _, _, _, _, _, _, _, precio = GetItemInfo(producto)
  9.                     _, items = GetContainerItemInfo(bolsos, huecos)
  10.                     if raro == 0 and precio ~= 0 then
  11.                         total = total + (precio * items)
  12.                         print("|cff555555Sold "..items.." "..producto.. " |cff555555" .. GetCoinTextureString(precio * items))
  13.                         UseContainerItem(bolsos, huecos)
  14.                     end
  15.                 end
  16.         end
  17.     end
  18.     if total ~= 0 then
  19.         print("|cff555555--")
  20.         print("Total money gained: " .. GetCoinTextureString(total))
  21.     else
  22.         print("|cff555555No grey items to sell.")
  23.     end
  24. end
  25.  
  26. local BotonVender = CreateFrame( "Button" , nil, MerchantFrame, "UIPanelButtonTemplate" )
  27. BotonVender:SetText("Sell Junk")
  28. BotonVender:SetWidth(90)
  29. BotonVender:SetHeight(21)
  30. BotonVender:SetPoint("TopRight", -180, -30 )
  31. BotonVender:RegisterForClicks("AnyUp")
  32. BotonVender:SetScript("Onclick", VENDER)
  33. --

Mortimerlol 08-07-17 08:52 PM

Because I want do it. Thanks for speak bad about my proyect all time. :mad:

briskman3000 08-07-17 09:03 PM

Quote:

Originally Posted by Kakjens (Post 324541)
In provided code I don't see the reason for repeated printing.
You can add a variable to count how many times you have printed and with the help of it exit the loops.
P.S. I am crying.

WAIT ...


so this addon is using the variables

Code:

lhprestigemax
lhprestige
lhhonorlevelmax
lhhonorlevel

Those are clearly variable names from my honor addon Legion Honor

lightspark 08-07-17 09:14 PM

Quote:

Originally Posted by Mortimerlol (Post 324576)
Because I want do it. Thanks for speak bad about my proyect all time. :mad:

It's called critique and you may actually want to listen to these people.

You're ignoring many good practices, thus making your and everyone else's lives a lot harder. For instance, you define a lot of global variables. It's actually quite risky, because it may interfere w/ other addons and, even worse, Blizz code.

Mortimerlol 08-07-17 10:26 PM

Yes but not really... Some people is saying that is horrible and these is FALSE, not using a lot memory or similar... nah, i must leave... bye.

Mortimerlol 08-08-17 04:06 AM

Im fixing global problems... https://www.townlong-yak.com/globe/#...b70ea80b04c0e2


All times are GMT -6. The time now is 04:39 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI