- Home /
Question by
lizzybluts · May 06, 2014 at 04:25 AM ·
pickupsyntax error
I have an error placing my pickup script into game
"There is a syntax error on line 1. Code hinting may not work until you fix this error.
Error:
"var points : int;
function Update () {
}
function OnTriggerEnter (col : Collider) {
var playerStatus : PlayerStatus = col.GetComponent(PlayerStatus);
playerStatus.AddPoints(points);
ObjectCollect.collect++;
Destroy(gameObject);
}
I have no idea how to fix this. Can anyone give me a suggestion?
Thank you
Mary
Comment
The double quotes should not be at the start of line 1. Is that the issue you are asking about?
Remove the " mark. Is that the problem?
var points : int;
function Update () {
}
function OnTriggerEnter (col : Collider) {
var playerStatus : PlayerStatus = col.GetComponent(PlayerStatus);
playerStatus.AddPoints(points);
ObjectCollect.collect++;
Destroy(gameObject);
}
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Very simple picking up items script? 2 Answers
Pick Up Weapons 1 Answer
Unity mistaking one object for another 0 Answers
Phisics question! How can I launch this object?!??!?!?!! 0 Answers