wawi
Visitor
|
variables in server - 2009/02/18 02:27
hello, it is my module test:
| Code: |
class test:
numero=1
def __init__(self,server):
self.server = server
self.name = "test"
self.server.registerNode('sum',self.name)
return
def doNode(self,nodeName,node,client):
if nodeName == 'sum':
numero=numero+1
client.clientSendMessage(self.server.formatMessage('hello',[],you number is: '+str(numero)))
return
|
The users call this function and variable "numero" increment, but I have the error, the error is "global name "numero" is not defined". how I can repair this problem?
else, how I can compile a .exe?
|