iOS Question Strange error in 4.30

John Sturt

Active Member
Licensed User
Longtime User
Hi
I have jut upgraded to B4I 4.30
and get a strange error on this code.
My other apps run fine it is just this one.

The only difference i see is an icon after the
Process_Globals which has a tooltip of Resumeable Sub.

This is what i get on compile

B4i Version: 4.30
Parsing code. (0.03s)
Compiling code. Error
Error compiling program.
Error description: Object reference not set to an instance of an object.
Error occurred on line: 87
End Sub

Any help?


B4X:
'Code module
#Region  Project Attributes
   #ApplicationLabel: Knight Commander
   #Version: 1.0.0
   'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
   #iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight
   #iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
   #Target: iPhone, iPad
   #ATSEnabled: True
   #MinVersion: 7
   #PlistExtra: <key>UIFileSharingEnabled</key><true/>
#End Region

Sub Process_Globals
   Public app As Application
   Public NavControl As NavigationController
   Private Page1 As Page
   Type Reg(Name As String,Gender As String,health As Int,Sleep As Int,CurrentTask As Int,StageOfTask As Int,Counter As Int,Skills(10) As String)
   Dim Pe(100) As Reg
   Dim folk As Int
   Dim Cpage As String
   Dim pr As Int
   Dim Person(50) As Label
   Dim Tsk(100,10) As String
   Dim per As Int
   Dim ItemHeight,ItemBorder As Int
   Dim Score,OldScore As Int
   Dim youfight,themfight As Int
   Dim PleaseWait As ActivityIndicator
   Dim EnemyDeclare,EnemyArmySize,EnemyValue,EnemyRate,EnemySpawn As Int
   Dim BackTime,ActiveTime As Long = 0
   Dim enemy(25,2) As String
   Dim match As Int
   Dim OutFolder,OutFile As String
   Dim Re(100,20) As String
   Dim media(8) As MediaPlayer
   Dim mindex As Int = 0
   Dim LastUpdate As Long
   Dim FightTimer As Timer
   Dim UpdateNow As Boolean
   Dim FG,BG,IBG,SFG,SFG2,BG2 As Int
   Dim ReadyToSell,ReadyToMake As Boolean
   Dim TRes,TTsk As Int
   Dim GroupSelect As Boolean
   Dim StartPrice As Int
   Dim FT(100) As Float
   Dim SellPercent(10) As Label
   Dim SellAmount As Int
   Dim ShopLabels(10) As Label
   Dim Make(10) As Label
   Dim MakeN As Int
   Dim timer As Timer
   Dim TTS As TTS
   Dim Days As Int
   Dim DayLabel(10) As Label
   Dim Gold As Int
   Dim Control(15) As Label
   Dim ControlNames As List
   Dim QuestPrice,QuestSlots As Int
   Dim GameCounter As Int
   Dim Quest(20,10) As String
   Dim QuestLabel(20) As Label  
   Dim medallabel(50) As Label
   Dim CalcX,CalcY,CalcW,CalcH As Int
   Dim mc As Int
   Dim Craft(100) As Label
   Dim CN As Int
   Dim medalList As List
   Dim ColourSlide (5) As Int
   Dim TaskLabel(100) As Label
   Dim NameList As List
   Dim market(100) As Label
   Dim HelpSwitch (9) As Int
   Dim dead(25) As Label
   Private renametext As TextField
   Private renamedone As Button
   Private renamecancel As Button
   Private renamenext As Button
   Private fightresult As Label
   Private versus As Label
   Private them As Label
   Private you As Label
   Private backpanel As Panel
   Private youpanel As Panel
   Private thempanel As Panel
  
End Sub

Line 87 is the last line of code
 

John Sturt

Active Member
Licensed User
Longtime User
Hi Erel
Thank you for the offer of help and apologies for the late response.

I found that I had a Type field declaration called Sleep

This only becomes a problem when upgrading from a version of B4I with no Resumeable Subs to one with the
feature in it
 
Upvote 0
Top