SFSUser.getPlayerId NullPointerException

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

ersindemir
Posts: 30
Joined: 30 Apr 2016, 07:23
Location: Turkey

SFSUser.getPlayerId NullPointerException

Postby ersindemir » 10 Feb 2017, 20:18

I got this exception on Runtime.

Code: Select all


task = SmartFoxServer.getInstance().getTaskScheduler().schedule(new Runnable() {
            @Override
            public void run() {
                    for (User player : getParentRoom().getPlayersList())
                        trace(player.getPlayerId());
            }
        }, 1000, TimeUnit.MILLISECONDS);
                  
java.lang.NullPointerException
at com.smartfoxserver.v2.entities.SFSUser.getPlayerId(SFSUser.java:433)


Smartfox v: 2.12.0
Backend (Java)
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SFSUser.getPlayerId NullPointerException

Postby Lapo » 11 Feb 2017, 10:52

Hi,
I don't know how to reproduce this.
Is it actually reproducible? Or is it erratic?

If it's reproducible can you walk me through the steps that lead to this error?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
ersindemir
Posts: 30
Joined: 30 Apr 2016, 07:23
Location: Turkey

Re: SFSUser.getPlayerId NullPointerException

Postby ersindemir » 11 Feb 2017, 17:52

it is erratic. I dont know how it is happened and I can not repoduce it.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 49 guests