i have tried everything to do this but im not having any luck here!!
what have I done wrong in this code below? it wont even load the app in my box when adding this and i cant figure out what i have done wrong, i have used the regScreen as a template to do this
'***************************************************************
' Check user is paid or not and update registry
'***************************************************************
Function checkUserType(token As String) As String
token = RegRead("RegToken", "Authentication")
m.UrlBase = "http://XXXXXX.net/roku"
m.UrlGetUserInfo = m.UrlBase + "/accounts.php"
http = NewHttp(m.UrlGetUserInfo)
http.AddParam(" token", token)
while true
rsp = http.Http.GetToString()
xml = CreateObject("roXMLElement")
if not xml.Parse(rsp) then
print "Can't parse check User status"
ShowConnectionFailed()
return 2
endif
if xml.GetName() <> "result" then
print "unexpected check user status response: ", xml.GetName()
ShowConnectionFailed()
return 2
endif
if islist(xml.GetBody()) = true then
for each e in xml.GetBody()
if e.GetName() = "type" then
userType = e.GetBody()
RegWrite( "userType", userType)
else
return 3
endif
next
endif
end while
End Function
also is it possible to add this to the appDetailsScreen , or maybe appHomeScreen so that it checks on another page outside the regScreen?