Hi everyone. I’ve got my VoteMap going pretty well now, but now I’m stuck. I have the server file broadcasting to all of the clients that a vote has been made, at which point the clients then update their DListViews accordingly.
In my code here, maplist is the DListView. I create a local variable containing the GetLines function on it, then I run a for loop that should run through each line and figure out if it matches my map name, (which is the variable “decoded”.) So far it is no where finished, but I want to at least be able to get the names from the DListView first.
print("Client receiving message, map is: “…decoded[“map”]…”, and votes is: "…decoded[“votes”])
local mlist = maplist:GetLines()
for k,v in pairs(mlist) do
–if v:GetValue(2) == decoded[“map”] then --If the value of the selected line in the second column is whatever map is, then…
if v:GetValue(2) then
v:SetValue(2, decoded[“votes”]) --Set dat dere line!
print(“Updated a line.”) --Just FTR…
What should be happening, is it should be printing the value. I get nothing. Not even nil. Just nothing.
Thanks for any help.