Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJames Harris
Courses Plus Student 441 PointsError message
Assets/Scripts/PlayerMovement.cs(21,80): error CS1503: Argument #3' cannot convert
object' expression to type `float'
Getting this error every time I try enter play mode
1 Answer
Alan Mattan贸
Courses Plus Student 12,188 Points[I'm learning english, my english is not good]
The console window is useful for debugging what is wrong. It is telling you PlayerMovement.cs(21,80). PlayerMovement.cs is the name of the script where is the error. 21 is the line and 80 is the error position approximation. You can double click the error and the Mono or Visual Studio editor will open showing you the position with the cursor in where is the error (close to the error). The error can be before or after this position of the cursore but not too far away. In your case you try to assign a game object value to a float number. Next time add include the code in the question.
Helgi Helgason
7,599 PointsHelgi Helgason
7,599 Pointsif you can post your code. I can probably help you. Some variable is probably set to the wrong type