Trying to iterate through a table and getting an issue. The if statement never is true and I don’t know what am I am doing wrong. This hasn’t happened before so I don’t know why it’s not working.
for i, card in pairs (ListCards) do
isInQueue = true;
if card["name"] == player.Name then
warn("MATCH FOUND");
cardInList = card;
table.insert(valuesInCard, i, string.split(card["name"], "]-"));
break;
end
end
First, can you print card[“name”] for each iteration, and second.
I recommend doing if string.lower(card["name"]) == string.lower(player.Name) then
As it kind of makes life better.