Search found 5 matches
- 13 Sep 2019, 10:12
- Forum: Server Side Extension Development
- Topic: Problem with tasksceduler in zone extesion
- Replies: 3
- Views: 8166
Re: Problem with tasksceduler in zone extesion
Hi, you have to make sure to catch all exceptions inside your run() method otherwise an error in your task could stop it from running. Check this short article for more details: https://smartfoxserver.com/blog/how-to-schedule-timed-tasks-in-an-extension/ Hope it helps catch exceptions solved my pro...
- 06 Sep 2019, 16:10
- Forum: Server Side Extension Development
- Topic: Problem with tasksceduler in zone extesion
- Replies: 3
- Views: 8166
Re: Problem with tasksceduler in zone extesion
Hi, you have to make sure to catch all exceptions inside your run() method otherwise an error in your task could stop it from running. Check this short article for more details: https://smartfoxserver.com/blog/how-to-schedule-timed-tasks-in-an-extension/ Hope it helps ok, i'm going to check catchin...
- 06 Sep 2019, 16:07
- Forum: Server Side Extension Development
- Topic: Disconnect NPCs from room or zone
- Replies: 3
- Views: 8105
Re: Disconnect NPCs from room or zone
Lapo wrote:What version of SFS2X are you using?
i'm using from v2.13.4.
Lapo wrote:When you say that sometimes it doesn't work what do you mean? Do you see any errors?
most times it work well but sometimes extension keep npc alive in room, i don't know why it happening.
- 06 Sep 2019, 15:27
- Forum: Server Side Extension Development
- Topic: Problem with tasksceduler in zone extesion
- Replies: 3
- Views: 8166
Problem with tasksceduler in zone extesion
Hi, i wrote a code for checking something in period of time, in my extension and use of that for my zone extension. SendStats = sfs.getTaskScheduler().scheduleAtFixedRate(new SendStats(), 0, 10, TimeUnit.SECONDS); i call this task scheduler in init() method, bud after some minutes (10-30) dosen't wo...
- 06 Sep 2019, 15:19
- Forum: Server Side Extension Development
- Topic: Disconnect NPCs from room or zone
- Replies: 3
- Views: 8105
Disconnect NPCs from room or zone
hi, sometimes i have one npc in my room extension when opponent isn't available, game playing well and no problem on play time, but when i trying to disconnect NPC with this codes, sometimes it working well and sometimes not. getApi().disconnectUser(NpcPlayer); getApi().removeRoom(getParentExtension...