John Scalzi explains why writers shouldn't assume that they're going to get paid, ever. He also explains the corollary -- that getting paid up front is better than hoping that royalties will roll in. My favorite bit:
"[receiving] higher royalties rather than higher advances [. . . ] is a fine idea if a) you have an independent source of income and/or b) are already raking in the bucks from your book sales and you have infinite faith that c) your publisher will always be there to send you royalties on a regular basis and/or d) won’t try to screw you on contractual details that allow them to hold on to your money for as long as humanly possible. As most authors aren’t [or] don’t fulfill conditions a) or b) and should never assume c) or d), most authors are better off getting a large, upfront chunk of cash into their hands asap — that is, they should have an advance."
Go on. It's worth the read. (And it's not long.)