I am trying to make a game score by inserting a value to the text field when each sprite is clicked by the mouse.
My code looks like as follows:
on mouseDown me
member("Score Tally").text = integer("Score Tally")
lvCurrentScore = lvCurrentScore + 100
lvCurrentScore = ("Score Tally")
It doesn't provide me with any errors when I compile it but when I click the sprite it places null in the text field.
Any help would be greatly appreciated thank you.
It's difficult to understand from your code what "Score Tally" is, but assuming it's a member name the following might help:
on mouseDown me lvCurrentScore = integer( member("Score Tally").text ) lvCurrentScore = lvCurrentScore + 100 member("Score Tally").text = string(lvCurrentScore) end