I want to delete this post

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
star0629
Posts: 22
Joined: Thu Nov 28, 2013 9:04 pm

I want to delete this post

Post by star0629 » Sat Dec 14, 2013 1:04 am

I want to delete this post
Last edited by star0629 on Sat Dec 14, 2013 4:25 pm, edited 1 time in total.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: saving highscore

Post by Simon » Sat Dec 14, 2013 2:19 am

Hi star0629,
Check out "global" in the dictionary.
One thing to remember, it must be declared everywhere you use it.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: saving highscore

Post by Klaus » Sat Dec 14, 2013 12:54 pm

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

Post Reply