PDA

View Full Version : Problem using lists :s


juice
11-20-2008, 11:09 AM
Hi

This is my first post so hi :)

I am trying to make a fishing game, I want to use a list to store the value of 2 everytime the user clicks on the fish and out the score to text. I have been trying different ways to set the list value to 0 but I am having no luck. Basically all I want to do is:

When user clicks on fish
do{
totalScore.set(value,(totalScore + 2));
scoreText.set(text, totalScore.toString());
}

And this will be repeated everytime the user clicks on the fish

When I try and set the list(totalScore) to 0, it only gives me the option to set the value to an expression :S

I have also tried to set it up using arrays but it still only lets me set the value to an expression. Can anyone help me with this?