sfsExtension "include" and Reload Extension

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

craftyfirefox
Posts: 9
Joined: 03 Jun 2008, 07:51

sfsExtension "include" and Reload Extension

Postby craftyfirefox » 22 May 2009, 04:16

This question might have already been answered, but looking for the term "include" in serverside extensions forum is a bit of a lengthy search.

Anyways, we are using the command "include" to have a common base for our games, and being able to make custom extensions in some parts.

To make that a bit clearer, heres an example:

myGameExtension.as:

Code: Select all

#include "baseExtension.as"
function init()
{
  base_init();
  // init the game
}

baseExtension.as:

Code: Select all

function base_init()
{
  // init the game
}

Ok, now the Problem: If I change something in baseExtension.as and then try to go to ZoneBrowser -> Zone -> ExtensionView -> Reload Ext , only "myGameExtension.as" (and its changes) are reloaded, but NOT baseExtension.as .

I know that this would require the server to know all the dependencies of the extension, but these could also be defined as optional Config XML entries in the zone. Maybe this is even already possible, but TBH I didn't find it so far or read over it.

Would be great if this issue could be treated in one of the next Bugfix releases, thank you!
Last edited by craftyfirefox on 05 Jun 2009, 06:13, edited 1 time in total.
craftyfirefox
Posts: 9
Joined: 03 Jun 2008, 07:51

Postby craftyfirefox » 26 May 2009, 07:30

Any Ideas how I could force the included file to be reloaded on a remote productive system?
craftyfirefox
Posts: 9
Joined: 03 Jun 2008, 07:51

Postby craftyfirefox » 04 Jun 2009, 13:18

is the "include" command so odd that nobody ever uses it and runs into this problem?

Please, I would have to rethink our hole structure if I can't find a way to reload such a file on a productive system, so please please give me a pointer how to do that.

Thanks in advance for all your help and consideration!
sstark
Posts: 77
Joined: 21 Nov 2008, 16:06

Postby sstark » 04 Jun 2009, 21:41

your code is being interpreted, and because of this I could easily see an include not being usable. Also, it's based on as1, and I forget that syntax for includes.
craftyfirefox
Posts: 9
Joined: 03 Jun 2008, 07:51

Postby craftyfirefox » 05 Jun 2009, 06:14

My Sample wasn't completely correct. But now it should work. And my question was not wether this "could" work - because it already does.

My question was wether I could force a file that is not directly written into the configuration of Smartfoxserver to reload when it is changed on a productive system, where a restart is not really an option when 2.000 Clients are connected.

Thank you for your assistance!
alamed
Posts: 39
Joined: 16 May 2008, 15:47

Postby alamed » 31 Jan 2011, 09:41

I'm pumping this up because I want to know the answer to this. It would help us update our servers without needing to restart, because we use that exact structure.

Thanks.

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 23 guests