problems loading an extension

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

Moderators: Lapo, Bax

foxter888
Posts: 78
Joined: 10 Apr 2011, 05:52
Location: united states

problems loading an extension

Postby foxter888 » 13 Oct 2011, 02:09

ok first of all yes i have read the docs, i'm using netbeans to make the extension and i do know that i don't need a class path so it's a java class library project. the sintax is correct to pretty much almost copied from the fps tutorial. now i'm trying to add the extension to a room. by using the admin tool of course. and yes by the way i navigated through the smartfox installation and the folder extension and copied the jar in there.

now when i go to the admin too and use the zone configurator in the extension tab i can see the fps tutorial extension there but it won't show up the extension that i added. and yes i did restarted my server and so on too.

now one question would be by using netbeans how to i find in my project the .properties file? i don't know how to use that and my extension won't show up why would be the reason? the fps extension and the smartfox tris show up.

i apreciate the help
get to work you slacker!!!
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 13 Oct 2011, 03:37

You don't need a properties file.
Your extension needs to be called something ending on Extension.
For ex. MyExtension, FPSExtension, mygameExtension.
Then the tool will pickup the extension and you will be able to select it.
Same goes for the Zone and Room extension java files in the jar.
You can call them ZoneExtension and RoomExtension.
Only when they end with ...Extension, they will get picked up.
foxter888
Posts: 78
Joined: 10 Apr 2011, 05:52
Location: united states

Postby foxter888 » 13 Oct 2011, 11:49

Thanks that works, the server reconizes my file now.
One question would how to debug extensions? I'm using unity to send a message to the server, the extension is uncataloged properly but I don't seem to get a callback.
I'm going to post my code when I'm able to get to my computer.
get to work you slacker!!!
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 13 Oct 2011, 16:37

You can add traces to your extension and and check the logs for them.
foxter888
Posts: 78
Joined: 10 Apr 2011, 05:52
Location: united states

Postby foxter888 » 13 Oct 2011, 17:02

That could be good to try, by the way I have never used traces, could you show me a example? And will I see the traces if I run smartfox as a standalone?
get to work you slacker!!!
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 14 Oct 2011, 01:42

trace("MySFSExtension loaded");
Yes, you should see them in the console.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: jackhuang89 and 37 guests