cant see my extention

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

styx418
Posts: 6
Joined: 26 May 2017, 03:26

cant see my extention

Postby styx418 » 01 Jun 2017, 02:56

can some1 help me
i cant see my own ext in zoneconfig
Attachments
sfsextctrl.png
(178.68 KiB) Not downloaded yet
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: cant see my extention

Postby Lapo » 01 Jun 2017, 07:42

Hi,
Extensions must be compiled and deployed as a jar file.
Please make sure to read this section of the documentation:
http://docs2x.smartfoxserver.com/Extens ... uick-start

Also, if you're not familiar with Java you can write Extensions in Javascript which is easier. (Requires SFS2X version 2.13)
http://docs2x.smartfoxserver.com/Extens ... uick-start

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
styx418
Posts: 6
Joined: 26 May 2017, 03:26

Re: cant see my extention

Postby styx418 » 02 Jun 2017, 03:11

i have fellow many tuto ..trying 2 way
if some1 french can explain me that will be easier for me .. if not i dont know .. im using eclipse if that can help ..
Attachments
sfsctrlext.png
(238.34 KiB) Not downloaded yet
styx418
Posts: 6
Joined: 26 May 2017, 03:26

Re: cant see my extention

Postby styx418 » 05 Jun 2017, 15:07

ok i made one other extension from the link u shared me .. and that dont work anymore .. si i<ll put the src can u see and explain me what im going wrong plz ...
Attachments
bloodsong.rar
(2.84 KiB) Downloaded 337 times
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: cant see my extention

Postby Lapo » 05 Jun 2017, 15:19

HI,
the extension you have sent doesn't even compile correctly, so it shouldn't be a surprise that it doesn't work.

Code: Select all

this.addRequestHandler(math, mathHandlers);

The only line in your init() method refers to some "mathHandlers" symbol which can't be found anywhere.

I can only recommend that you actually follow the tutorial I linked, step by step.
If you prefer a video, here you go:
https://www.youtube.com/watch?v=nKGxhwJ0Ccc

But make sure to follow it exactly, otherwise you won't succeed.

Good luck
Lapo

--

gotoAndPlay()

...addicted to flash games
styx418
Posts: 6
Joined: 26 May 2017, 03:26

Re: cant see my extention

Postby styx418 » 21 Aug 2017, 13:36

any1 speack french ? i need some1 to talk lol
styx418
Posts: 6
Joined: 26 May 2017, 03:26

Re: cant see my extention

Postby styx418 » 08 Sep 2017, 13:36

Lapo wrote:HI,


I can only recommend that you actually follow the tutorial I linked, step by step.

Good luck




its wont work any more ...
Attachments
MyExt.rar
tuto extension
(1.98 KiB) Downloaded 325 times
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: cant see my extention

Postby Lapo » 08 Sep 2017, 14:12

Hi,
the name of the jar file is incorrect and must end with "Extension" such as "MyExtension.jar" or "AsteroidExtension.jar".
Also the name of your main class doesn't follow the correct naming convention, which is optional.

Pleas make sure to read the documentation first:
http://docs2x.smartfoxserver.com/Gettin ... rator-zone

under "Zone Extension tab"

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: cant see my extention

Postby Lapo » 08 Sep 2017, 15:11

Also it is documented in the "Writing the first Java Extension" tutorial here:
http://docs2x.smartfoxserver.com/Extens ... extensions

which I recommend to read in its entirety.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
styx418
Posts: 6
Joined: 26 May 2017, 03:26

Re: cant see my extention

Postby styx418 » 08 Sep 2017, 15:15

hell yea i finaly got my first extention work haha :D :D


:evil: Exception: com.smartfoxserver.v2.exceptions.SFSRuntimeException
Message: Provided Request Handler does not implement IClientRequestHandler: class com.a51.integrated.sfs2x.LoginEventHandler, Cmd: DBLogin
Description: Extension initialization failed.



wtf :o
Attachments
MyExtension.zip
(5.42 KiB) Downloaded 334 times
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: cant see my extention

Postby Lapo » 08 Sep 2017, 15:58

It means that the class LoginEventHandler that you registered as Request Handler does not extend the BaseClientRequestHandler class as expected.

It's not very useful to attach the zipped extension with no sources :wink:
Just post the error, it's usually more than enough.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 68 guests