Page 1 of 1

I want to delete this post

Posted: Sat Dec 14, 2013 1:04 am
by star0629
I want to delete this post

Re: saving highscore

Posted: Sat Dec 14, 2013 2:19 am
by Simon
Hi star0629,
Check out "global" in the dictionary.
One thing to remember, it must be declared everywhere you use it.

Simon

Re: saving highscore

Posted: Sat Dec 14, 2013 12:54 pm
by Klaus
Hi Star,

you can access EVERY object form EVERYWHERE, as long as you use the correct "address" :D

Code: Select all

...
put fld "scorefield" OF CD "scorecard" OF STACK "scorestack" into tScoreVariable
...
Same for your "mouseup":

Code: Select all

on updateScore
  add 1 to field "scoreField" OF CD "scorecard" OF STACK "scorestack"
end updateScore
Or use a global variable as Simon suggested.


Best

Klaus