Hi!
I am creating a type of questionare to help decide the outcome of a situation. My original idea was to make a flowchart between lua files using Director but I have discovered that this process leads to highly inaccurate answers. My solution to this is to use a score system to determine the outcome. My problem, here, is where to start.
I am using Director first off, and have a series of 8 lua files, each one contains a separate question and about 5 usable buttons. Each button takes you to the next lua file with the next question, but each button is also worth a different amount. I want the user to answer the 8 questions and come out on the results page with a score based on which buttons they hit.
I thought it would be as simple as creating a global variable of Score = 0 at the menu and adding Score = Score + 1 to the button touch event, this sadly does not work.
I get this error when I touch the button.
A6.lua:26: attempt to perform arithmetic on global 'Score' (a nil value)
stack traceback:
Since this is obviously not working my way, how would any of you go about doing this? sorry if my problem isnt as coherent as it should be. And, also if I get this to work Ill make a demo quiz framework and put it into the Code Exchange. [import]uid: 10355 topic_id: 12113 reply_id: 312113[/import]

[import]uid: 52491 topic_id: 12113 reply_id: 44651[/import]
[import]uid: 10355 topic_id: 12113 reply_id: 45022[/import]