The code I have is:
class New(Server):
noOfCl = 0
def onConnect(self, socket):
print "Client connected"
print (noOfCl+=1)
I am receiving the following error: UnboundLocalError: local variable 'noOfCl' referenced before assignment. From what I understand, I'm declaring noOfCl before I am referencing it. Anyone have any ideas as to what I'm doing wrong?
Thanks
NameError.