Topic History of: variables in server Max. showing the last posts - (Last post first)
Author
Message
wawi
teank you :D, I now use the free code or code base, palabre is fantastic!! :)
Byee bye
Dorantor
You should get something like this:
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': self.numero = self.numero + 1
msg = self.server.formatMessage('hello', [], you number is: ' + str(self.numero))
client.clientSendMessage(msg)
return
Dorantor
I guess you should use not just
Code:
numero
but
Code:
self.numero
wawi
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?
SORRY, website is currently mostly broken due to software changes on the server.
Hope to fix it soon ...