Reading current score on batari basic

49 views Asked by At

I need to read score current value for avoid negative number on decrementing.

However the following code not working, any idea for solve this ?

__Sub_Score_30
 if score > 30 then score = score - 30 else score = 0
 return otherbank
1

There are 1 answers

0
Eduardo Fabricio On

I need create 3 dim vars for each 2 digits of score:

  dim sc1=score
  dim sc2=score+1
  dim sc3=score+2

Just change the conditional code for vars reading score.

__Sub_Score_30
 if sc1=$00 && sc2=$00 && sc3>$30 then score = score - 30 else score = 0
 return otherbank