Answer the question
In order to leave comments, you need to log in
How to use k from previous for?
Hello, please help me, I don’t understand at all how to do this
, there is a code
for k in pairs(metadmin.plombs) do
local sub3, row = sub2:AddSubMenu(k)
row:SetTextInset(10,0)
for k,v in pairs(metadmin.plombs.tt) do
sub3:AddOption(v, function()
net.Start("metadmin.order")
net.WriteEntity(line.ply)
net.WriteBool(true)
net.WriteString(k)
net.SendToServer()
tabs:Remove()
end):SetTextInset(10,0)
end
end
Answer the question
In order to leave comments, you need to log in
Well, when declaring the second for, you overwrite k, change the name to another so that it does not intersect with k from the outer loop
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question