I was Following a first unity tutorial and i got an error, im messing with it all day - read this

this is script i wrote true tutorial

Original Tutorial Script

The Error

15 views and no reply, seriously nobody knows whats wrong with it?

well, this will be a looong night :eyes:

if(other.GameObject.tag == “Pickup”)
{
}

not
if(other.GameObject.tag == “Pickup”)
{
{

1 Like

that’s not the problem. its { than again 1 time before yours and after. later at the end there are 3
} that close it.

Do the brackets geta bit of color in front of them in your Mono Develop? That will help check which closing bracket belongs to which open bracket. That way you’ll easily see which one is the one that you have too many of. Just start at the top.

Also, I don’t know if you can use false with a capital F. it’s possible you’ll have to use a small letter “f” there.

its simple. use code tags and format your code well and you will get answers. Also keep in mind it is weekend

1 Like

As mentioned by @ , post your code. This gives everyone who wants to help the possibility to easily check your code.

For one, “False” should be “false”. And it appears you’re missing the closing brace for your class. (because you inserted an extra opening brace before the last code line.)

But seriously, why did you just not compare the two line by line, you would see these things yourself.

Im sure since you posted you can read right, your code is not even the same. People have stated you have your { } confused and wrong. Clearly see your problem is your if statement which an extra { and your not closing them properly. Your code does not match the 2nd screen you posted of the tutorial you are following. Patience youngling. Check your typo’s.