Originally Posted by Mortimerlol
Thanks for reply!
I trying with ur code and cant be good.
Lua Code:
local tableC = {} for k,v in pairs(BangCharKills) do tableC[#tableC + 1] = k end if hates[v] then tableC[k] = v end table.sort(tableC) --for i = 1, #tableC do print(tableC[i]) end print(tableC[1]) 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)?