S seiji101 New Member Aug 8, 2012 #1 hello there im new in programming with basic4android and i would like to ask how to do a basic mathematical operation.. can anyone help me pls... thank you ive tried this one but it wont work it gives me an error.. Code: Copy Sub Globals dim score as int score = 0 lscore as label End Sub Sub balk_Click score + 2 lscore = score End Sub
hello there im new in programming with basic4android and i would like to ask how to do a basic mathematical operation.. can anyone help me pls... thank you ive tried this one but it wont work it gives me an error.. Code: Copy Sub Globals dim score as int score = 0 lscore as label End Sub Sub balk_Click score + 2 lscore = score End Sub
M MLDev Active Member Licensed User Longtime User Aug 8, 2012 #3 Dim lscore as label score = score + 2 Last edited: Aug 9, 2012 Upvote 0
S seiji101 New Member Aug 9, 2012 #4 thanks for the help.. but now i have another problem.. i want to do is every time a click the button the score will add 2... Last edited: Aug 9, 2012 Upvote 0
thanks for the help.. but now i have another problem.. i want to do is every time a click the button the score will add 2...
barx Well-Known Member Licensed User Longtime User Aug 9, 2012 #5 Well, that is fine. Just add the syntax corrections to your original code. Code: Copy Sub Globals Dim score as int: score = 0 Dim lscore as label End Sub Sub balk_Click score = score + 2 lscore.text = score End Sub Upvote 0
Well, that is fine. Just add the syntax corrections to your original code. Code: Copy Sub Globals Dim score as int: score = 0 Dim lscore as label End Sub Sub balk_Click score = score + 2 lscore.text = score End Sub