Calling InspirationPad Tables Within Script

I'm attempting to call to a table within my script file but I only ever get back blank results. Hopefully someone will be able to spot what it is that I'm doing wrong.

Here is the test table I am using:
Table: TestTable

I have this saved as "TestTable.ipt" in my LangData folder.

This is the code I am using to try roll on the table and get the result ('sector' is defined earlier in the script as a global variable):
Sub TestTableRoll()
    Dim ipad 'as InspirationPad
    Dim i 'as Int
    ' Load the table.
    ipad = CreateIpadTable("TestTable.ipt")
    ' Roll 4 times
    ipad.Go 4
    ' Get the results.
    For i = 0 To 3
        sector.GMNotes = sector.GMNotes & "Result " & i & ": " & ipad.GetResult(i) & vbNewLine
    Next 'i
    FreeObject ipad
End Sub

In my GM Notes for the sector, all I see is:
Result 0:
Result 1:
Result 2:
Result 3:

Thanks in advance.

Leave a Comment