Search found 20654 matches

by Lapo
08 Oct 2019, 14:30
Forum: SFS2X Questions
Topic: NullReference session
Replies: 8
Views: 3622

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: 3622

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: 3622

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: 762

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: 3411

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: 242

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: 44

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: 156

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: 44

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: 156

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: 156

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: 156

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.
by Lapo
02 Oct 2019, 09:46
Forum: SFS2X Questions
Topic: SFSApi - getNewScheduler
Replies: 3
Views: 64

Re: SFSApi - getNewScheduler

The first one configures the global Scheduler, which is used to run tasks that run in the future either once or repeatedly. The second one controls the server's internal thread pools. These usually don't need to be changed in most cases. If you want to learn more about these thread pools read here: ...
by Lapo
02 Oct 2019, 08:22
Forum: SFS2X Questions
Topic: Can i add multiple event handlers for the same event?
Replies: 11
Views: 156

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

There are two ways to add event handlers in an Extension, using SFSExtension as the base class. addEventHandler(SFSEventType eventType, Class<?> theClass) and addEventListener(SFSEventType eventType, IServerEventHandler handler) The former takes a Class which will be auto-instantiated when needed, a...
by Lapo
02 Oct 2019, 07:37
Forum: SFS2X Questions
Topic: SFSApi - getNewScheduler
Replies: 3
Views: 64

Re: SFSApi - getNewScheduler

Hello, 1. What is the difference between SFSApi.getNewSchedule(int poolSize), SFSApi.getSystemScheduler() and SmartFoxServer.getInstance().getTaskScheduler()? SmartFoxServer 2X runs a global Task Scheduler whose thread pool can be configured via AdminTool > ServerConfigurator. You can use this to ru...

Go to advanced search