r/UnityHelp • • Apr 04 '23

Missing Comma?

I copied some code off a youtube tutorial, but it said that it was missing a comma on line 40, character 87. I checked there and there was already a comma there, I thought maybe it needed 2 commas for some reason so I tried adding an extra one. It then just said "argument missing". Does anyone know what is going on?

0 Upvotes

4 comments sorted by

1

u/nulldiver Apr 04 '23

If you have a code problem, please paste the code.

1

u/ItsFud Apr 04 '23

I fixed it

1

u/Moth_Drake Apr 05 '23

I’d be curious what it was about? I had a similar issue one time and as I’d follow the error log’s ‘advice’ it never made anymore sense and I wound up just scrapping the script.

2

u/nulldiver Apr 11 '23

Unless there is very obviously a missing comma where it says, that is usually a syntax error you’ll see when someone has really messed up structure in a script and so the compiler is interpreting things not at all as intended. Best to look for messed up syntax in the area around the mentioned line since something on the line before, for exa, could have caused the problem.