0

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
jps
  • 20,041
  • 15
  • 75
  • 79
Eduardo Fabricio
  • 2,151
  • 2
  • 25
  • 32

1 Answers1

0

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
Eduardo Fabricio
  • 2,151
  • 2
  • 25
  • 32