Search found 26 matches

by FireSmartFox
05 Apr 2019, 14:01
Forum: SFS2X Questions
Topic: IDBManager and Null values
Replies: 9
Views: 3462

Re: IDBManager and Null values

It's exactly the same problem. Using executeQuery with "SELECT column_name_of_timestamp FROM table" triggers NullPointerException if column_name_of_timestamp of the row is NULL. row.containsKey("column_name_of_timestamp") returns false if the content is NULL. It returns true when...
by FireSmartFox
05 Apr 2019, 13:11
Forum: SFS2X Questions
Topic: IDBManager and Null values
Replies: 9
Views: 3462

Re: IDBManager and Null values

Did this change? It seems that not.
I found this out while debugging since suddenly a part of the application wsa not working. :shock:
by FireSmartFox
25 Mar 2019, 15:08
Forum: SFS2X Questions
Topic: send request to all users (java)
Replies: 5
Views: 117

Re: send request to all users (java)

I created a HashMap to have an own user object called "Player". Every Place instance has a reference to the SFS user. I do this to assign some properties and other stuff to the player. But sometimes when I literate through the list to send something to all players with a certain property, ...
by FireSmartFox
21 Mar 2019, 00:05
Forum: SFS2X Questions
Topic: Sender is not a User Why?
Replies: 8
Views: 1541

Re: Sender is not a User Why?

I have the same problem.
Lapo wrote:
Before you can interact with the server you need to perform two steps:
1- Connect
2- Login


So if I check "sfs.isConnected==true" before submitting a request it wouldn't be enough, right? What do you recommend to check if the login is currently valid?
by FireSmartFox
18 Feb 2019, 18:04
Forum: SFS2X Questions
Topic: send request to all users (java)
Replies: 5
Views: 117

Re: send request to all users (java)

I see, thanks a lot.
Even this is already just Java related, I am wondering why this is taking so much more memory because I thought I am passing just references into a new List?
Apart from it, I now took your version. :D
by FireSmartFox
18 Feb 2019, 17:30
Forum: SFS2X Questions
Topic: send request to all users (java)
Replies: 5
Views: 117

send request to all users (java)

Hi, is this code in general a good idea if I want to send something to ALL currently connected users? public void sendToAll(String pCommand, ISFSObject resObj) { List<User> userlist2 = new ArrayList<>(); Collection<User> userliste = this.getParentZone().getUserList(); for (User derUser : userliste) ...
by FireSmartFox
06 Jan 2019, 22:54
Forum: SFS2X Questions
Topic: user name format requirements
Replies: 1
Views: 63

user name format requirements

Hi, hope you guys are doing well and still are completely involved into sfs2x :) I want to allow my users to choose a nick name before login into the sfs2x application. Are there requirements or a validation rule (maybe even regex)? So I can check it before login to make sure the login will be perfo...
by FireSmartFox
06 Jan 2019, 22:44
Forum: SFS2X Questions
Topic: reset log file
Replies: 2
Views: 77

Re: reset log file

Using sfs2sx.sh to see it live on screen is great. :)
by FireSmartFox
05 Jan 2019, 14:45
Forum: SFS2X Questions
Topic: reset log file
Replies: 2
Views: 77

reset log file

Sometimes I have to scroll down a bit while testing a SFS2X app when I open the log file. Any chance to delete the log file to have a new one (so I don't have to wait for the next period of time in which a new file will be created)? I deleted once the file, but the it seems just hidden and a new one...
by FireSmartFox
11 Dec 2018, 10:37
Forum: SFS2X Questions
Topic: sending a db row to client
Replies: 3
Views: 203

Re: sending a db row to client

Hi, I am not sure I understand. The query returns 1-2 rows max but you want to send them separately? Yes. That doesn't sound too efficient. It's usually better to send data in one batch, unless it's very big or there's some other particular reason. There are. The receiver for each row are different...
by FireSmartFox
10 Dec 2018, 20:33
Forum: SFS2X Questions
Topic: sending a db row to client
Replies: 3
Views: 203

sending a db row to client

I want to put one db row result to a SFSObject to send it to the user. There are max. 1-2 rows at the same time and for some reasons I want to do separate submits, not the complete result. ISFSArray res = dbManager.executeQuery(sql, new Object[] {}); if (res.size() > 0) { for (int i = 0; i < res.siz...
by FireSmartFox
07 Dec 2018, 18:36
Forum: The Gallery
Topic: Project Vague - A Sandbox MMO Adventure
Replies: 26
Views: 1485

Re: Project Vague - A Sandbox MMO Adventure

How can I login? After typing some random data it just says ""logging in"
by FireSmartFox
04 Dec 2018, 18:04
Forum: SFS2X Questions
Topic: private user variables
Replies: 3
Views: 170

Re: private user variables

I see. But I can make, in case of an extension, the user variable hidden and private so the user will never know which name this variable has and then I can at least do some server stuff like send all user extra content with a certain variable value? I think I will create a class for the user proper...
by FireSmartFox
04 Dec 2018, 16:19
Forum: SFS2X Questions
Topic: private user variables
Replies: 3
Views: 170

private user variables

Hi,
simple question, but can't find the answer to it:
Is a user variable, set as private by server, for user read-only? Or can the user change the value illegal? I am thinking about assign functionality only for a few users set by a variable boolean.
by FireSmartFox
02 Dec 2018, 18:14
Forum: SFS2X Questions
Topic: accidently multiple extension instances?
Replies: 3
Views: 136

Re: accidently multiple extension instances?

Oh yeah - I had a destroy method without super call... Guess where I have it from? :D From https://smartfoxserver.com/blog/how-to-schedule-timed-tasks-in-an-extension - I forgot to extend the method: public void destroy() { if (taskHandle != null) taskHandle.cancel(); } I added super.destroy(); now.

Go to advanced search