function ValidateProgress(progress)
    local found = false
    for i, v in ipairs(GameProgress) do
        if v.Name == progress then
            found = true
            break
        end
    end
    if not found then
        print("Invalid progress name: "..progress)
    end
    return found
end


function GoToProgress(progress)
    if not ValidateProgress(progress) then
        return
    end
	
	for i, v in ipairs(GameProgress) do
        if v.Name == progress then
            local scene = v.Name

            v.Init()
      
            if scene~="" then
			  GoTo(progress,false,true) 			
            end

            break
        else
            v.Close()
        end
    end
end


function InitProgress(progress)
    if not ValidateProgress(progress) then
        return
    end
    for i, v in ipairs(GameProgress) do
        if v.Name == progress then
            v.Init()
            break
        end
    end
end
