Help with statement

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

Help would be appreciated :slight_smile:

1 Like

Can you send over the table, ListCards?

Well ListCards is fetching data from a Trello board and decodes it into a Lua table so I can’t really show what’s inside it.

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.

1 Like

Thanks, this helped me figure out the real issue, appreciate the help!