Help comparison tables
I have this code:
Lua Code:
Thanks for help! |
I can't get a positive code, somebody have an idea?
|
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.
|
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. |
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). |
Code:
local tableC = {} |
Quote:
I trying with ur code and cant be good. :( Lua Code:
|
Sorry for my english. I go to explain in code text, i hope that now you understand me:
Lua Code:
Thanks for help !!!!!!!! |
Quote:
I don't understand how did you derive your code from example of Banknorris. Why Code:
tableC[#tableC + 1] = k end 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)? |
Quote:
|
Need it only to close my addon, some suggestion? THANKS!
|
I have no idea what you're trying to do
|
Lua Code:
|
Ohhhhhhhhh excelent work :D :D
Thanks u so much Banknorris :) :) :) :) :) |
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:
Thanks u all one more time :o |
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. |
Ok, I was doing bad. Now not do loop...
Lua Code:
|
[solved]
Well, now is done!
Lua Code:
Thanks Banknorris for help me. |
what is this outer for loop good for?
|
pas06, both for loops are strange.
Mortimerlol, make Paco, Anabel and Francisco have the same number of kills, and test what happens. |
Quote:
|
Quote:
My guess is that you did something wrong in the adaptation. |
I go to check then, sry.
|
no good values, i dont understand :(
Lua Code:
|
Your code woks but I dont understand why I can't print line per line, as for example:
Lua Code:
I dont see that I do wrong. |
That's because sorted table has different structure - there's an extra dimension.
Code:
local which = 0 |
yes but, i need line per line but with 1, 2, 3, 4:
Lua Code:
|
I only need can do:
Lua Code:
|
Yeah, now works as like/need. THANKS !
Lua Code:
|
no, no works, im crazy with it :mad:
|
Quote:
|
Thanks...
Lua Code:
|
Quote:
|
¬.¬ ¬.¬ ¬.¬ ¬.¬ ¬.¬
|
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. |
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:
|
Because I want do it. Thanks for speak bad about my proyect all time. :mad:
|
Quote:
so this addon is using the variables Code:
lhprestigemax |
Quote:
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. |
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.
|
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