I actually thought I had fixed this issue but seems not to be the case. I have noticed that when the app starts it performs a urlTransfer to check a value from the server. If all is good it proceeds to the next step where it checks if user info exist, if not it goes to a task to get certain user info. Once the user info is obtained, it basically starts from the top of the code. The problem occurs at this point. Here is the basic code to start.
Sub RunUserInterface()
Print "RUNUSERINTERFACE"
screen = CreateObject("roSGScreen")
port = CreateObject("roMessagePort")
screen.setMessagePort(port)
scene = screen.CreateScene("BusySpinnerExample")
screen.show()
url="http://xxxxxx.vvvvv.cc/backcheck.txt"
backcheck=urlTransferServer(url)
backcheck=backcheck.toint()
if backcheck <> 0
presetup()
else
kickout()
end if
end sub
The urlTransferServer function is saved in a utilies.brs file located in the source folder. On the initial start the urlTransferServer is found and processed. Once the code reaches the presetup() (located in the main.brs) code and the user inputs info, the RunuserInterface() is called again. At this point I get the error that "Function Call Operator () attempted on non-function". In other words it is no longer recognizing the urlTransferServer as a function. If I place the urlTransferServer function in the main.brs, all works as expected. I could work around the error but would really like to know why it sees the function initially but not later. Would it be that the user input task falls in a folder outside of the source folder?