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 trialSebastian Dizon
529 PointsI keep getting an error message saying that the code couldn't be compiled even though it runs fine on Xcode
Whenever I try to run it, it doesn't work even though I quadruple checked the code, and even tried to run it on Xcode. :/
2 Answers
Nicklas Lind
3,619 PointsCan you please post the code here (using the ```Markdown format)?
Nicklas Lind
3,619 PointsI don't remember that challenge. Is it the "Named Parameters" one?
Try writing it in the Treehouse console like this:
func greeting(#person: String) {
println("Hello \(person)")}
greeting(person: "Tom")
Sebastian Dizon
529 PointsOh, sorry, Heres the link: https://teamtreehouse.com/library/functions-and-optionals/functions/function-return-types-2
Also, the output has the same error message
Sebastian Dizon
529 PointsSebastian Dizon
529 PointsThis his how it runs in Xcode
This is what it says in the website...
And This is the code, Thank you