What I did:
integers {
score : integer "0" ;
lastscore : integer "0" ;
}
subroutines {
sub_score : subroutine {
: if ((score-lastscore)==1) {
: print "[[The score has just gone up by 1 point.]]" ;
}
: else {
: print {("[[The score has just gone up by " + (score-lastscore) + " points.]]" )}
}
: set_integer var = "lastscore" {(score)}
}
}
In code game:
: increment "score" ; #add var = "score" value = "value" ;
: gosub "sub_score" ;