> there functions (network_players,etc)teclared in the tutorials they exist or is just a random name for them?
> where I can find all the functions and their definitions??
>
First, thanks for trying out the Tut. It would probably help to post this in the Online tutorial thread since it would be easy for me to overlook it otherwise.
Anyways..the naming of the functions is covered in the tutorial but basically... In podsixnet all user written functions in the client need to start with "Network_" then I added the "players" part to make the function Network_players. This function is right in the .cap file for the client.
def Network_players(self, data):
playertext = ("*** players: " + ", ".join([p for p in data['players']]))
statusBox.AppendText(playertext + "\n")[/code:28kftdwz]
The above function is in the client code that YOU write. Then in the server you call the code by performing a "player" action like below:
[code:28kftdwz] def SendPlayers(self):
self.SendToAll({"action": "players", "players": [p.nickname for p in self.players]})[/code:28kftdwz]
You also write the above function.
So the client waits for a network packet with an action of "players" from the server. When that happens then the function Network_players is called and the data from the server is handled by the client.
Hope this makes sense.
I think I understood
sry for my bad english first of all.. and thanks one more time for the help
you first get the ''function' like network that exist in the podsixnet then add a random name and in the server file must be smething declared with that random name to work..that's it?
makes sense then