PDA

View Full Version : [Question] Extension also works if there isn't .....?!



Hatta
03-13-2011, 11:50 PM
Hello.
Continue reading the book, come to Chapter 6, I have a problem regarding the installation of the extensions, especially the extension DigginPlugin used as an example.
I'm using ES5, I rebuilt AS3 project to make it compatible, and I did the same with the extension pack GameBook. It works .... but I do not think it should work :confused:

Let me explain. I copy the folder GameBook in the folder extensionof ES5, reboot the server and go into the admin panel -> Server Extensions. Then select from the list GameBook and create two Server-level Component: TimeStampPlugin and DigginPlugin, as indicated by the book. Restart the server again.
Try the game and it works (from the log ES5 I also see the response by the DigginPlugin with the content of EsObject). So far ok but ....

when the server is restarted just read TimeStampPlugin initialized and not also DigginPlugin initialized, why?
when I delete the Server-level Component DigginPlugin and reboot the server and then the game, because everything still work? From the log, DigginPlugin continues to give me answers
To use a plugin, I do not necessarily instantiate a server-level plugin component of reference, or I misunderstood?

I hope I was clear (sorry but I'm an Italian boy ... thank goodness there is google translator who helps me :D), thanks.

tcarr
03-14-2011, 12:50 AM
For that extension, you do not need to have DiggingPlugin as a server level component. It's a room level plugin, so it will work anyway as long as the extension hasn't been removed, and the TimeStampPlugin is still server level. When you get to the second digging game, you will need to make GMSInitializer a server level component. I'm on the wrong computer to look at the source code, but you will only see DiggingPlugin initialized is there is a logging line saying that in the plugin's init method.

Heh, I use google translate too. A few weeks ago we had one user with questions who posted in Russian half the time. I hadn't used my Russian since about 1978....

Hatta
03-14-2011, 06:00 PM
Ah ok, I thought that all plugins setup went that way, but only those used at the server level, those at room no. I did a test, in fact, just remove the reference to the DigginPlugin in the file Extension.xml and the game by mistake.
Thus, the extensions used at the server level to be configured in the administration panel, those at room level enough to be present in the "package" and that there is a reference in file Extension.xml (short handle).
Thanks again. If I break things that work, I understand everything much clearer :)



A few weeks ago we had one user with questions who posted in Russian half the time. I hadn't used my Russian since about 1978....
lool :D

tcarr
03-14-2011, 06:05 PM
I learn more by making mistakes than when I do it the right way the first time, too. For one thing, the embarrassment helps me remember the lesson longer! ;) When I move to a new town sometimes I get myself lost on purpose, so that I can get familiar with where things are faster.

I checked page 77 of the book, and it only mentions TimeStampPlugin as a server-level component. You were probably lucky that ES5 started correctly; there are some room level plugins that will cause problems with starting ES5 if they are made server-level, because they use features that are room-level only.