Hello..
I'm trying to keep score of my trivia game... right now.. Every time the user click the correct answer .. I add 1 to the field Correct.. and the same if the user selects the wrong answer .. I add 1 to the field ..Wrong...
But ..Can't figure how to transfer the sum of the fields.. Correct .. Wrong on to the Next Card... and so on.. and so on...
Thanks
Jerret...
HOW CAN U KEEP SCORE FOR A TRIVIA GAME?.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 9
- Joined: Mon Dec 05, 2011 5:33 pm
-
- Posts: 22
- Joined: Mon Dec 05, 2011 5:33 pm
Re: HOW CAN U KEEP SCORE FOR A TRIVIA GAME?.
Newbie here, but I believe if you want to transfer the values of a variable from card to card, you'd need to declare it as a global variable first. Probably best to do this in the main stack, so that it's available to every subsequent substack or card.
-
- Posts: 9
- Joined: Mon Dec 05, 2011 5:33 pm
Re: HOW CAN U KEEP SCORE FOR A TRIVIA GAME?.
Hello.. josephreesGA75ef
I'm going to try it out... and see what happens...
Thanks... for responding...
I'm going to try it out... and see what happens...
Thanks... for responding...
Re: HOW CAN U KEEP SCORE FOR A TRIVIA GAME?.
Hello all.
LiveCode is far nicer than that. No need to declare anything. Read up on the "put" command, the cornerstone of them all.
Make a stack with two cards.
Put a button and a field on card 1. Put some data into that field.
Put a blank field on card 2
Go back to card 1 and put this handler into the button script:
It is all fun and games from there. You HAVE to play around. Do it al lot.
Craig Newman
LiveCode is far nicer than that. No need to declare anything. Read up on the "put" command, the cornerstone of them all.
Make a stack with two cards.
Put a button and a field on card 1. Put some data into that field.
Put a blank field on card 2
Go back to card 1 and put this handler into the button script:
Code: Select all
on mouseUp
put fld 1 into fld 1 of cd 2
end mouseUp
Craig Newman