quarry icon indicating copy to clipboard operation
quarry copied to clipboard

The skeleton client from readthedocs does not work for me

Open TanishiWalter opened this issue 1 year ago • 3 comments

I copied the code from readthedocs (changed few things, but that should not be the problem), but it does not work. When I try to join server with it, it does not show up on the server's side, even for a second.

Here is the code:

from twisted.internet import defer, reactor from quarry.net.client import ClientFactory, ClientProtocol from quarry.net.auth import OfflineProfile

class ExampleClientProtocol(ClientProtocol): pass

class ExampleClientFactory(ClientFactory): protocol = ExampleClientProtocol

@defer.inlineCallbacks def main(): print("logging in...") profile = OfflineProfile("Walper") factory = ExampleClientFactory(profile) print("connecting...") factory = yield factory.connect("serverIP(should not be the problem too)", 25565) print("connected!")

if name == "main": main() reactor.run()

TanishiWalter avatar Mar 20 '23 22:03 TanishiWalter

What is variable name at line -3? At a minimum, you should write if __name__ == "__main__":, otherwise the code will not even start running Do you have any errors?

zax2002 avatar Mar 26 '23 21:03 zax2002

What is variable name at line -3? At a minimum, you should write if __name__ == "__main__":, otherwise the code will not even start running Do you have any errors?

When waiting __ , it makes the letters bold, and makes __ invisible. It accualy is name And main

TanishiWalter avatar May 09 '23 22:05 TanishiWalter

What is variable name at line -3? At a minimum, you should write if __name__ == "__main__":, otherwise the code will not even start running Do you have any errors?

When waiting __ , it makes the letters bold, and makes __ invisible. It accualy is name And main

If you want to write those name, use ` and write it inside them. Example:

`__main__`

Outputs: __main__

MajliTech avatar May 30 '23 20:05 MajliTech