Search found 36 matches

by Rob
02 Oct 2019, 07:53
Forum: SFS2X Questions
Topic: Can i add multiple event handlers for the same event?
Replies: 11
Views: 176

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

Lapo wrote:There's been a misunderstanding. I thought you were referring to server-side events :) which support multiple handlers.

I'm not OP so I'm not 100% sure what was meant, but I was also referring to server-side. The docs I linked are for the SFSExtension class, which is only server-side, right?
by Rob
01 Oct 2019, 20:56
Forum: SFS2X Questions
Topic: Can i add multiple event handlers for the same event?
Replies: 11
Views: 176

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

Uhh... Aren't you supposed to only have ONE handler per event? The docs for addEventHandler even specifically says so: " NOTE: Each event can have only one handler." http://docs2x.smartfoxserver.com/api-docs/javadoc/server/com/smartfoxserver/v2/extensions/SFSExtension.html#addEventHandler-...
by Rob
30 Jul 2019, 10:51
Forum: SFS2X HTML5 / JavaScript API
Topic: Missing code completion
Replies: 5
Views: 987

Re: Missing code completion

I'm pretty sure IntelliSense doesn't require type definitions to work. Granted, type info is really good to have and will expand the code suggestions so I'm all for adding that! But even without type definitions it should be possible to get basic things like method name suggestions. We get code comp...
by Rob
29 Jul 2019, 17:00
Forum: SFS2X HTML5 / JavaScript API
Topic: Missing code completion
Replies: 5
Views: 987

Missing code completion

For some reason I'm not getting IntelliSense working for the smartfox API when using the client npm package. All other installed npm packages work fine and give me code completion, so I suspect it has something to do with how it's packaged. I'm using IntelliJ IDEA, but I also tried it in VSCode and ...
by Rob
02 Jul 2019, 16:15
Forum: SFS2X HTML5 / JavaScript API
Topic: Return value documentation errors
Replies: 5
Views: 601

Re: Return value documentation errors

Yeah, I wouldn't use === like that. I would use something like if (!usr) { ... } it was just an example of what might happen with the current documentation.
by Rob
02 Jul 2019, 13:19
Forum: SFS2X HTML5 / JavaScript API
Topic: Return value documentation errors
Replies: 5
Views: 601

Re: Return value documentation errors

While both null and undefined are falsy values in Javascript they are not the same. So if the developer assumes null is what indicates an error, something like this could happen:

Code: Select all

const usr = myRoom.getUserById(x);
if (usr === null) {
   // Handle error
} else {
   // Assume all is OK
}
by Rob
02 Jul 2019, 08:14
Forum: SFS2X HTML5 / JavaScript API
Topic: Return value documentation errors
Replies: 5
Views: 601

Return value documentation errors

There are several places in the documentation where functions are listed as returning null, when they in fact return undefined.
This will obviously cause bugs if a developer explicitly checks for null.

Examples are the getUserById & getUserByName functions.
by Rob
21 Jun 2019, 08:12
Forum: SmartFoxServer 1.x Discussions and Help
Topic: need help in "bList"
Replies: 14
Views: 674

Re: need help in "bList"

That sure looks like code related to the Cocolani Island MMO, and it's not open source afaik. It's listed at the SmartFox Showcase page.
by Rob
04 Jun 2019, 14:33
Forum: SFS2X Questions
Topic: Suggestion: customize initial roomlist
Replies: 3
Views: 191

Re: Suggestion: customize initial roomlist

Yes, that's what I'm currently doing. But that leads to multiple ROOM_GROUP_SUBSCRIBE events having to be sent to the user after processing the login. My suggestion was to add functionality to the custom login to subscribe the user to those groups immediately on login so that the LOGIN response will...
by Rob
04 Jun 2019, 09:47
Forum: SFS2X Questions
Topic: Suggestion: customize initial roomlist
Replies: 3
Views: 191

Suggestion: customize initial roomlist

Could there be a way in a custom login to populate the initial roomlist with specific room groups? At the moment there's no way to specify what room groups individual users subscribes to. There's only the global "Default Room Groups" setting which applies to all users. At the moment, we ha...
by Rob
04 May 2019, 19:36
Forum: SFS2X Questions
Topic: Leave Room what sort of room?
Replies: 2
Views: 226

Re: Leave Room what sort of room?

Code: Select all

if (room instanceof MMORoom) {
   // your code
}
by Rob
29 Apr 2019, 14:30
Forum: SFS2X Questions
Topic: Event closing CMD SFS2x
Replies: 2
Views: 175

Re: Event closing CMD SFS2x

Discussed here.
by Rob
19 Mar 2019, 16:20
Forum: SFS2X Questions
Topic: [NEW] SFS2X 2.13.5 available!
Replies: 1
Views: 470

Re: [NEW] SFS2X 2.13.5 available!

The AdminTool alerts me that 2.13.5 is available even though I successfully installed it. It thinks my installed version is 2.13.3.

Edit: It fixed itself if I restarted the AdminTool. I guess it only checks the version when the app starts up, not when it connects to the server...
by Rob
06 Mar 2019, 22:07
Forum: SmartFoxServer 1.x Discussions and Help
Topic: Limit of 3541 sockets/users
Replies: 2
Views: 377

Re: Limit of 3541 sockets/users

Probably a file descriptor limit issue. Check that you used ulimit as described in the docs.

Also see this topic for further gotchas.
by Rob
28 Feb 2019, 20:58
Forum: SmartFoxServer 1.x Discussions and Help
Topic: Too many connections
Replies: 2
Views: 240

Re: Too many connections

FYI, that error message is misspelled. "Retrive" -> "retrieve".

Go to advanced search