Search found 20732 matches

by Lapo
11 Oct 2019, 19:15
Forum: SFS2X Questions
Topic: SmartFoxServer unit testing
Replies: 8
Views: 1323

Re: SmartFoxServer unit testing

Given the the NoClassDefFoundError in the stack trace it sounds like you're missing some dependencies at runtime.
Make sure that your test classpath includes the SFS2X/lib/ folder so that all jars in there can be found.

Hope it helps
by Lapo
11 Oct 2019, 08:04
Forum: SFS2X Questions
Topic: SmartFoxServer unit testing
Replies: 8
Views: 1323

Re: SmartFoxServer unit testing

Hi,
I am not familiar with PowerMockito. Are you getting any specific error?

Thanks
by Lapo
09 Oct 2019, 15:54
Forum: SFS2X Questions
Topic: NullReference session
Replies: 8
Views: 5153

Re: NullReference session

I found the error to come from this script: I don't think so. The stack trace doesn't reference your Extension. Yes this problem can be replicated. If you can replicate it every time you can double check that the Room with ID provided in the error is actually running an Extension. You can use the A...
by Lapo
08 Oct 2019, 14:30
Forum: SFS2X Questions
Topic: NullReference session
Replies: 8
Views: 5153

Re: NullReference session

One thing is logging out and another is disconnecting. Which one is it?

Also I don't understand how a user who has just disconnected could cause the exception you've reported.
Can this problem be replicated? If so can you explain the steps to reproduce it?

Thanks
by Lapo
08 Oct 2019, 08:54
Forum: SFS2X Questions
Topic: NullReference session
Replies: 8
Views: 5153

Re: NullReference session

The exception you have posted is not about a NullPointer and it's not related with User Variables.
It is telling you that a client invoked an Extension on a Room with id=4 and there are no Extension attached to it.

Cheers
by Lapo
07 Oct 2019, 14:30
Forum: SFS2X Questions
Topic: NullReference session
Replies: 8
Views: 5153

Re: NullReference session

Hi,
can you show me the server code that causes the issue and the stack trace of the error?

Thanks
by Lapo
06 Oct 2019, 07:49
Forum: SFS2X Questions
Topic: Disconnect all users for server maintenance
Replies: 2
Views: 815

Re: Disconnect all users for server maintenance

Hi,
instead of doing that wouldn't it be best to just shut down the server?
It would accomplish the same thing.

Otherwise if you want to kick people with a specific message, such as "we're shutting down for maintenance", you should use the SFSApi.kickUser() method.

Cheers
by Lapo
05 Oct 2019, 10:54
Forum: SFS2X Questions
Topic: Dropped outgoing messages and a client's consistency
Replies: 8
Views: 3539

Re: Dropped outgoing messages and a client's consistency

Hi, yes this is a very old thread indeed :shock: :) This feature has always been low priority and we eventually realized that it wouldn't provide significant improvements. Essentially the server is already very tolerant of slow clients, pushing it any further would not improve the experience for a p...
by Lapo
05 Oct 2019, 07:18
Forum: SFS2X Questions
Topic: Report Bug
Replies: 17
Views: 349

Re: Report Bug

I would suggest to compare the settings between the two Zones (yours and that of our examples)
Also compare the connection / disconnection handling code between the two. There's nothing magical in our examples :)

Let us know
by Lapo
04 Oct 2019, 17:49
Forum: SFS2X Questions
Topic: using MMOroom when game is not MMO
Replies: 3
Views: 92

Re: using MMOroom when game is not MMO

Hi, it all depends on a couple of things: 1) do you need to have hundreds or thousands of players interacting with each others? 2) do you need the AreaOfInterest mechanism? If the answer is yes to both then MMORoom is what you need. Otherwise it's likely not the case. As regards memory usage, MMORoo...
by Lapo
03 Oct 2019, 15:03
Forum: SFS2X Questions
Topic: Can i add multiple event handlers for the same event?
Replies: 11
Views: 246

Re: Can i add multiple event handlers for the same event?

I have overlooked, that the function is named differently. What is the difference between addEventListener and addEventHandler and where we should use one or the other? As i mentioned we've only documented the addEventHandler() method in our docs. It's easier to use because you don't have to manual...
by Lapo
03 Oct 2019, 13:05
Forum: SFS2X Questions
Topic: SessionReconnectionException
Replies: 2
Views: 92

Re: SessionReconnectionException

Hi, the error tells you that a client attempted to re-connect (presumably after a disconnection) but the server refused it. Typically this issue appears when the client takes too much time to reconnect and the relative "reconnection timer" is already expired. If you open the AdminTool unde...
by Lapo
02 Oct 2019, 16:56
Forum: SFS2X Questions
Topic: Can i add multiple event handlers for the same event?
Replies: 11
Views: 246

Re: Can i add multiple event handlers for the same event?

Here you go: public class MultiEventExtension extends SFSExtension { private static final class EvtHandler implements ISFSEventListener { @Override public void handleServerEvent(ISFSEvent event) throws Exception { System.out.println("---> Event: " + event); } } private EvtHandler evh1 = ne...
by Lapo
02 Oct 2019, 13:08
Forum: SFS2X Questions
Topic: Can i add multiple event handlers for the same event?
Replies: 11
Views: 246

Re: Can i add multiple event handlers for the same event?

Also you will have to remove each event listener manually in the destroy method via the corresponding removeEventListener() method.
by Lapo
02 Oct 2019, 13:04
Forum: SFS2X Questions
Topic: Can i add multiple event handlers for the same event?
Replies: 11
Views: 246

Re: Can i add multiple event handlers for the same event?

Use this:

Code: Select all

addEventListener(SFSEventType.USER_DISCONNECT, new OnUserDisconnect());
addEventListener(SFSEventType.USER_DISCONNECT, new OnRoomLeave());

Sorry, this is not part of the documented/official API.

Go to advanced search