Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is when this if statement returns false it breaks the for loop?

Asked by 4 years ago

so i have this code

for _,mentor in pairs(data.MentorCards) do
    local mentorname, mentortimezone, mentorcourses = mentor.name:match("(.+)%s?-%s?(.+)%s?-%s?(.+)")
    if tostring(data.Player.Name) == tostring(mentorname) then

    end
end

and if the if statement returns false it doesnt continute with the for loop, I need some help with this.

Answer this question