You do not say specifically, but I am guessing you are using python?
Python is quite specific in indenting rules as it uses indenting to define code blocks. Where in C you'd include code between { and }
in python it is done with indentation.
For example:
if x == 1:
print ‘hello’
print ‘goodby’
hello will only be printed if the value of x is 1. goodby will be printed regardless of the value of x.
My guess is you have some indentation where you should not.