I keep getting this error
Current Function:
032:
033:
034: 'Returns available ad pod(s) scheduled for rendering or invalid, if none are available.
035: adPods = RAF.getAds()
036: playContent = RAF.showAds(adPods) 'show preroll ad pod (if any)
037:
038: curPos = 0
039: if playContent
040:* videoScreen = SetContent(episode)
041: end if
042:
043: closingContentScreen = false
044: contentDone = false
Function Call Operator ( ) attempted on non-function. (runtime error &he0) in pkg:/source/FullRAFIntegration.brs(40)
040: videoScreen = SetContent(episode)
On this code
Sub PlayContentWithFullRAFIntegration(episode as Object)
'Main facade creation.
canvas = CreateObject("roImageCanvas")
canvas.SetLayer(1, {color: "#000000"})
canvas.SetLayer(2, {text: "Loading..."})
canvas.Show()
RAF = Roku_Ads() 'RAF initialize
print "Roku_Ads library version: " + RAF.getLibVersion()
RAF.setDebugOutput(true) 'for debug pupropse
'RAF content params
RAF.setContentId(episode.contentId)
RAF.SetContentGenre(episode.contentGenre)
'Indicates whether the default Roku backfill ad service URL
'should be used in case the client-configured URL fails (2 retries)
'to return any renderable ads.
RAF.setAdPrefs(true, 2)
'Returns available ad pod(s) scheduled for rendering or invalid, if none are available.
adPods = RAF.getAds()
playContent = RAF.showAds(adPods) 'show preroll ad pod (if any)
curPos = 0
if playContent
videoScreen = SetContent(episode)
end if
closingContentScreen = false
contentDone = false
while playContent
videoMsg = wait(0, videoScreen.GetMessagePort())
if type(videoMsg) = "roVideoScreenEvent"
if videoMsg.isStreamStarted()
canvas.ClearLayer(2)
end if
if videoMsg.isPlaybackPosition()
'cache current playback position for resume after midroll ads
curPos = videoMsg.GetIndex()
end if
if not closingContentScreen 'don't check for any more ads while waiting for screen close
if videoMsg.isScreenClosed() 'roVideoScreen sends this message last for all exit conditions
playContent = false
else if videoMsg.isFullResult()
contentDone = true 'don't want to resume playback after postroll ads
end if
'check for midroll/postroll ad pods
adPods = RAF.getAds(videoMsg)
if adPods <> invalid and adPods.Count() > 0
'must completely close content screen before showing ads
'for some Roku platforms (e.g., RokuTV), calling Close() will not synchronously
'close the media player and may prevent a new media player from being created
'until the screen is fully closed (app has received the isScreenClosed() event)
videoScreen.Close()
closingContentScreen = true
end if
else if videoMsg.isScreenClosed()
closingContentScreen = false 'now safe to render ads
end if 'closingContentScreen
if not closingContentScreen and adPods <> invalid and adPods.Count() > 0
'now safe to render midroll/postroll ads
playContent = RAF.showAds(adPods)
playContent = playContent and not contentDone
if playContent
'resume video playback after midroll ads
episode.PlayStart = curPos
videoScreen = SetContent(episode)
end if
end if '!closingContentScreen
end if 'roVideoScreenEvent
end while
if type(videoScreen) = "roVideoScreen" then videoScreen.Close()
End Sub
I keep checking the code and I'm not sure whats going on