Score script problems

I got this script from activeden.net but I have no idea on how to to make it give me more than 1 score? can someone please just take a look and tell me what I need to change so it can give me more than 1 score?

Score Script Here

1 Answer

1

There is a line which reads

score++;

instead replace that entire function with:

function scoreMany (points : int)
{
    score += points
}

then, when you are calling the score function, call it with

scoreMany(howeverManyPointsToScore);

Isn't it much more convenient to actually know scripting yourself if you're programming? ;-) If you're struggling with the very basics of coding then read through the scripting references, go through tutorials within the area you find yourself having issues with. It's a winning situation for you.

–

Are you using SendMessage for anything? Make sure you spelled everything right, and are giving the correct paramaters.

–

Well, you need to change tellWho.SendMessage("ScoreOne") to tellWho.SendMessage("ScoreMany", amountToScore); where amountToScore is an integer.

–