It might be better if you posted the actual code excerpt ;)

We might be able to see what you've done wrong then.