Ok i have searched and searched I can not find anything that should be producing this error! Please help! Here is code from that activity:
#Region Activity Attributes
#FullScreen: True
#IncludeTitle: False
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private QuestionNumber As Int
Private WrongAnswers As Int
Private CorrectAnswers As Int
Private imgLine As ImageView
Private lblAddNumber1 As Label
Private lblAddNumber2 As Label
Private lblPlusSign As Label
Private btnAnswer1 As Button
Private btnAnswer2 As Button
Private btnAnswer3 As Button
Private btnAnswer4 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Practice_Add1s")
Main.MP.Stop
Question1
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Question1
QuestionNumber = 1
Main.MP.Load(File.DirAssets, "1+1.wav")
Main.MP.Play
lblAddNumber1.Text = "1"
lblAddNumber2.Text = "1"
Dim Answer1 As Int
Dim Answer2 As Int
Dim Answer3 As Int
Dim Answer4 As Int
Answer1 = 2
Answer2 = Rnd(1, 11)
If Answer2 = 2 Then
Do While Answer2 = 2
Answer2 = Rnd(1, 11)
Loop
End If
Answer3 = Rnd(1, 11)
If Answer3 = 2 Or Answer3 = Answer2 Then
Do While Answer3 = 2 Or Answer2
Answer3 = Rnd(1, 11)
Loop
End If
Answer4 = Rnd(1, 11)
If Answer4 = 2 Or Answer4 = Answer2 Or Answer4 = Answer3 Then
Do While Answer3 = 2 Or Answer2 Or Answer3
Answer3 = Rnd(1, 11)
Loop
End If
Dim RandomAnswers As Int
RandomAnswers = Rnd(1, 5)
Select RandomAnswers
Case 1
btnAnswer1.Text = Answer1
btnAnswer2.Text = Answer2
btnAnswer3.Text = Answer3
btnAnswer4.Text = Answer4
Case 2
btnAnswer1.Text = Answer2
btnAnswer2.Text = Answer3
btnAnswer3.Text = Answer4
btnAnswer4.Text = Answer1
Case 3
btnAnswer1.Text = Answer3
btnAnswer2.Text = Answer4
btnAnswer3.Text = Answer1
btnAnswer4.Text = Answer2
Case 4
btnAnswer1.Text = Answer4
btnAnswer2.Text = Answer1
btnAnswer3.Text = Answer2
btnAnswer4.Text = Answer3
End Select
End Sub
Sub btnAnswer4_Click
Select QuestionNumber
Case 1
End Select
End Sub
Sub btnAnswer3_Click
Select QuestionNumber
Case 1
End Select
End Sub
Sub btnAnswer2_Click
Select QuestionNumber
Case 1
End Select
End Sub
Sub btnAnswer1_Click
Select QuestionNumber
Case 1
End Select
End Sub
here is error:
Logger connected to: samsung SM-G950U
--------- beginning of main
Copying updated assets files (18)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
** Activity (practice_menu) Create, isFirst = true **
** Activity (practice_menu) Resume **
** Activity (practice_menu) Pause, UserClosed = true **
** Activity (practice_addition) Create, isFirst = true **
** Activity (practice_addition) Resume **
** Activity (practice_addition) Pause, UserClosed = true **
** Activity (practice_add1s) Create, isFirst = true **
Error occurred on line: 0 (Practice_Add1s)
java.lang.RuntimeException: Cannot parse: 1 as boolean
at anywheresoftware.b4a.BA.parseBoolean(BA.java:607)
at anywheresoftware.b4a.BA.ObjectToBoolean(BA.java:677)
at b4a.example.practice_add1s._question1(practice_add1s.java:439)
at b4a.example.practice_add1s._activity_create(practice_add1s.java:370)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:735)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:360)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:260)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at b4a.example.practice_add1s.afterFirstLayout(practice_add1s.java:104)
at b4a.example.practice_add1s.access$000(practice_add1s.java:17)
at b4a.example.practice_add1s$WaitForLayout.run(practice_add1s.java:82)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
** Activity (practice_add1s) Resume **