Search found 45 matches

by Rob
25 Mar 2020, 10:13
Forum: SFS2X Questions
Topic: Does room creation have a lot of overhead?
Replies: 6
Views: 33

Re: Does room creation have a lot of overhead?

How large would your map be? You could simply create all the required rooms at startup and never destroy them. Then you wouldn't have any overhead of re-creating/destroying rooms. I'm guessing it should handle hundreds of rooms fine on any normal server.
by Rob
20 Mar 2020, 19:54
Forum: Server Side Extension Development
Topic: MySQL Slow
Replies: 6
Views: 445

Re: MySQL Slow

You could try MariaDB instead. It's very similar to MySQL so it's easy to migrate to.
by Rob
22 Jan 2020, 01:36
Forum: SFS2X Questions
Topic: ROOM_VARIABLES_UPDATE continuously updates (how to stop)?
Replies: 5
Views: 858

Re: ROOM_VARIABLES_UPDATE continuously updates (how to stop)?

Your problem is that you set a new room variable in the ROOM_VARIABLES_UPDATE callback, which is triggered every time a room variable changes. So it will generate an infinite loop. Don't set any room variables in the callback. Set them on the server side, or move them to some other part of the clien...
by Rob
19 Dec 2019, 10:41
Forum: SFS2X Questions
Topic: [NEW] SFS2X 2.14.0 is available!
Replies: 40
Views: 5011

Re: [NEW] SFS2X 2.14.0 is available!

One improvement I have noticed with 2.14 is that I now consistently get ClientDisconnectionReason.IDLE when I let the (javascript) client sit idle. With 2.13 it mostly reported ClientDisconnectionReason.UNKNOWN, which I haven't seen happen yet with 2.14.
by Rob
18 Dec 2019, 01:25
Forum: SFS2X Questions
Topic: [NEW] SFS2X 2.14.0 is available!
Replies: 40
Views: 5011

AdGuard error

A heads up in case anyone else runs into this issue with the AdGuard ad blocker: While testing 2.14 I noticed an issue that didn't happen with 2.13: Safari 13.0.4 now gives the error: WebSocket connection to 'ws://192.168.0.100:8080/BlueBox/websocket' failed: No response code found: HTTP/1.1 101 Chr...
by Rob
15 Dec 2019, 09:57
Forum: SFS2X Questions
Topic: [[ NEW ]] Migration Tool available!
Replies: 4
Views: 1463

Re: [[ NEW ]] Migration Tool available!

The manual migration instruction page hasn't been updated for 2.14. Are there any caveats specific to this version when going from 2.13? Can the server.xml file be copied now for example?
by Rob
14 Dec 2019, 21:30
Forum: SFS2X Questions
Topic: [[ NEW ]] Migration Tool available!
Replies: 4
Views: 1463

Re: [[ NEW ]] Migration Tool available!

It seems like this wasn't included with 2.14, and trying to use the available version to update from 2.13 gives an error: "Target server version mismatch. Expected: 2.13, found 2.14.0"
by Rob
12 Dec 2019, 12:12
Forum: SFS2X Questions
Topic: [NEW] SFS2X 2.14.0 is available!
Replies: 40
Views: 5011

Re: Installation issues

you should NOT install the new SFS2X over an existing one. This is not a patch update, as per the release notes. Pleas just reinstall the server to a new folder. The installer defaulted to that option though, saying something about "do you want to preserve your old settings" or something....
by Rob
12 Dec 2019, 04:58
Forum: SFS2X Questions
Topic: [NEW] SFS2X 2.14.0 is available!
Replies: 40
Views: 5011

Installation issues

I tried installing 2.14 over my old 2.13 version on MacOS 10.14.6. That caused a bunch of errors. The server did seem to start though. But I had to install a clean version to get rid of the errors. 10-Dec-2019 14:10:10.318 SEVERE [main] org.apache.catalina.startup.ContextConfig.processAnnotationsFil...
by Rob
02 Oct 2019, 07:53
Forum: SFS2X Questions
Topic: Can i add multiple event handlers for the same event?
Replies: 11
Views: 730

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

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

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

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

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

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
}

Go to advanced search