how does rolist convert to fuction ?

I have created a rolist . I have added few members in to it using addtail method. then when i checked thelist type.. it was fuction. how does dis happen. Below is my code. Can someone xplain me how to get a list instead of function.


function Product_urls(response as string) As object
    'response = catalogs() 
    json = ParseJSON(response)
    product_urls = createobject("roList")
    for each element in json.ProductList
        elements_urls = element.PreviewList[0]
        if type(elements_urls) <> "Invalid" 
            elements_urls = element.PreviewList[0].URL
            product_urls.AddTail(elements_urls)        
        else
            elements_urls = ""
            product_urls.AddTail(elements_urls)  
        end if
              
    END for
return product_urls
   
end function           

I responded to your PM, so refer to that for more detail, but basically, the issue is that since BrightScript is not case sensitive, your function name and your variable name are the same. Change one or the other, and that should fix your issue.

It worked thanks!