Code spanning multiple lines shouldn't be an issue as long as you don't split in the middle of an object, method or property name. It can make the code more readable, and help in spotting errors.
You didn't say in what way the code "doesn't work", but I see several issues. First, be aware that...