PDA

View Full Version : Can't create a game



townivan
11-19-2004, 01:07 AM
Hello I am running the free ElectroServer 3.6.4
I have downloaded the "Monster" source code.

I am able to login to the chat lobby and chat normally but I am having problems when I try to create a game.
I do get the initial pop-up which asks for the name of the game but when I click "ok" it just returns me to the chat lobby.
When I inspect the "Start ElectroServer" window I see (under the ElectroServer is configured and running properly)
SEVERE [10] (XmlHelper.buildRoomFromXml): Error building room level plugin. Message = null
followed by several other lines of similar sounding stuff.

Any ideas?

I'm running XP.

jobem
11-20-2004, 08:42 PM
Hi townivan,

YOu downloaded the Monster source code. But did you install the plug-in? The monster game uses a special plug-in that needs to be installed into ElectroServer.

Installed a plug-in is as simple as adding a new plug-in node to the configuration.xml file. Just look near the bottom of that file for the existing plug-in XML. Add a new Room level Script plug-in and point it to the monster *.as file.

If you need more specific help then let me know.

townivan
11-20-2004, 09:28 PM
Thanks for the feedback Jobe.
Ok so I take the FightPlugin.as file which was in the Plugin folder of the Monster folder (when I extracted it all).
I copy this file into my plugins folder for electroserver (C:\Program Files\Electrotank\ElectroServer 3\plugins)
Then I update my configuration.xml file with a new node that points to that file? Right?
Like this?

<Name>MyMonsterPlugin</Name>
Script
<Scope>Server
<File>plugins\FightPlugin.as</File>
<Variables>
<Variable>
<Name>TestVariable</Name>
<Value>Blah Blah, Script test variable</Value>
</Variable>
</Variables>
</Plugin>

How do I know if type is Java or Script? Is that if the serverside plug is written in actionscript or java?
Do I need the Variables?

I really appreciate the help. :)

jobem
11-20-2004, 10:31 PM
If it is ActionScript then it has a *.as extension and it can be opened using mx 2004....and more importantly, it looks like ActionScript :-)

IF its Jave then its probably a jar or something.

townivan
11-22-2004, 09:22 PM
Darn. I did all that above but I get the same problem.

I even installed 3.6.5

To recap:
I copied FightPlugin.as into C:\Program Files\Electrotank\ElectroServer 3\plugins
I updated configuration.xml with the exact node I posted above.
I then launched ES followed by launching two fight.htm windows.
I logged in as Ralph on the first and Fred on the second.
I see both in chat just fine.
But when I try to create a game I get the problems I mentioned in my first post.

Anything else I can try?

Update: I have attached the error message I see.

jobem
11-22-2004, 10:05 PM
Hi Townivan,

Can you pasted teh error message in a post? There is something wrong wtih the image attachment (not your fault) but I cannot access it.

Thanks

townivan
11-23-2004, 12:41 AM
-=-=-=-=-=-=-=-
ElectroServer is configured and running properly
-=-=-=-=-=-=-=-
2004/11/22 13:34:01.470 SEVERE [10] (XmlHelper.buildRoomFromXml): Error building
room level plugin. Message = null
java.lang.NullPointerException
org.apache.xpath.XPathAPI.eval(Unknown Source)
org.apache.xpath.XPathAPI.selectNodeIterator(Unkno wn Source)
org.apache.xpath.XPathAPI.selectSingleNode(Unknown Source)
org.apache.xpath.XPathAPI.selectSingleNode(Unknown Source)
com.electrotank.electroserver.utilities.XmlHelper. loadSingleNodeAsString
(XmlHelper.java:777)
com.electrotank.electroserver.utilities.Properties Loader.buildPlugin(Pro
pertiesLoader.java:557)
com.electrotank.electroserver.utilities.Properties Loader.loadRoomPlugin(
PropertiesLoader.java:538)
com.electrotank.electroserver.utilities.XmlHelper. buildRoomFromXml(XmlHe
lper.java:938)
com.electrotank.electroserver.transactions.CreateR oomTransaction.execute
(CreateRoomTransaction.java:40)
com.electrotank.electroserver.transactions.Transac tionHandler.handleTran
saction(TransactionHandler.java:106)
com.electrotank.electroserver.ChatProtocol.process Message(ChatProtocol.j
ava:223)
org.ronsoft.protoplex.generic.AbstractGenericServe r.drainQueuedMessages(
AbstractGenericServer.java:144)
org.ronsoft.protoplex.nioimpl.server.NioServer.dra inQueuedMessages(NioSe
rver.java:471)
org.ronsoft.protoplex.nioimpl.server.NioConnection .handleReadySelection(
NioConnection.java:177)
org.ronsoft.protoplex.nioimpl.server.Dispatcher$Ha ndlerAdapter.run(Dispa
tcher.java:469)
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Wo rker.run(Unknown Sourc
e)
java.lang.Thread.run(Unknown Source)

townivan
11-23-2004, 12:43 AM
Here is the stuff that is above that in case you need it:
-=-=-=-=-=-=-=-
Starting ElectroServer 3.6.5
Go to http://www.electrotank.com/electroserver/ for the newest version.
-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-
Computer Information
Operating System: Windows XP
Operating System Architecture: x86
Processors Available: 1

-=-=-=-=-=-=-=-
Virtual Machine Information
Virtual Machine Vendor: Sun Microsystems Inc.
Virtual Machine Version: 1.4.2_04

-=-=-=-=-=-=-=-
Initializing PropertiesLoader
Parsing configuration XML file
Reading required values

-=-=-=-=-=-=-=-
Initializing Logger
Logging at level WARNING, also logging to console

-=-=-=-=-=-=-=-
Checking Electrotank.com for updates to ElectroServer...No updates available.

-=-=-=-=-=-=-=-
Loading license file
****DEMO LICENSE***
The server is not limited to a specific IP address
The server is limited to 20 concurrent connections
****DEMO LICENSE***

-=-=-=-=-=-=-=-
Loading administrators

-=-=-=-=-=-=-=-
Loading moderators
Added moderator: ExampleModerator

-=-=-=-=-=-=-=-
Loading banned users

-=-=-=-=-=-=-=-
Loading plugins
Loaded server-level plugin: LoadVarsScriptPlugin
Loaded server-level plugin: VariablesExampleJavaPlugin
Loaded server-level plugin: VariablesExampleScriptPlugin
-----Fight Plugin Initialized-----
Loaded server-level plugin: MyMonsterPlugin

-=-=-=-=-=-=-=-
Loading event handlers

-=-=-=-=-=-=-=-
Initializing language filter
Language filter is enabled
Filtering vulgar room names
Suppressing vulgar user names
Suppressing vulgar messages
Warning 1 time(s) before kicking
Kicking 1 time(s) before banning
Bans set to last 15 minute{s}
Currently set to not strip punctuation
Currently set to not strip HTML
Warning message set to: Hey! No swearing!
Kick message set to: Hey! I'm sick of your swearning, you're outta here!
Ban message set to: Ok, that's it, you're banned!
Added 6 root word(s) to the language filter
Added 10 word(s) to the language filter

-=-=-=-=-=-=-=-
Initializing flooding filter
Flooding filter is enabled
Maximum number of repeated messages allowed: 5
Interval to determine flooding: 5 second(s)
Maximum messasges per interval: 5
Warning 1 time(s) before kicking
Kicking 1 time(s) before banning
Bans set to last 10 minute{s}
Warning message set to: Hey! No flooding!
Kick message set to: Hey! I'm sick of your flooding, you're outta here!
Ban message set to: Ok, that's it, you're banned!

-=-=-=-=-=-=-=-
Loading persistent rooms
Creating zone: TheoChat
Creating room: The Dance Room
Creating room: The Atrium
Creating room: The Lounge
Creating room: The Garden

-=-=-=-=-=-=-=-
Initializing Web Server
Web server is enabled
Will listen on 127.0.0.1:8080
Directory listing is enabled
Root directory is set to: webserver-root\
Using 'webserver-docs\404.html' for 404 error template
Using 'webserver-docs\DirectoryListing.html' for directory listing template
Using 'webserver-docs\DirectoryListingDenied.html' for directory listing denied
template
Web Server startedAttempted to start web server...
Successfully started web server on specified address and port


-=-=-=-=-=-=-=-
Starting Command Line Listener

-=-=-=-=-=-=-=-
Starting Chat Server
Thread pool configured: min=1, max=10, keepalive=60000
Chat Server Started
-=-=-=-=-=-=-=-

webgeek
11-23-2004, 12:52 AM
Your XML code you are using to create a room level plugin is incorrect somehow. I bet you left a node blank or some such. Also, does this occur when the server first starts up even if no one has connected yet? Thanks

jobem
11-23-2004, 12:55 AM
Paste in everything between the and </Plugins> node.

townivan
11-23-2004, 01:07 AM
It only does this when I try to create a game. Specifically after I choose the name of the game and then click "ok".
You can see below with my comment where I added my plugin.
I tried two versions. Both resulted in the same problem.

The first:

<Name>MyMonsterPlugin</Name>
Script
<Scope>Server
<File>plugins\FightPlugin.as</File>
<Variables>
<Variable>
<Name>TestVariable</Name>
<Value>Blah Blah, Script test variable</Value>
</Variable>
</Variables>

</Plugin>

The second was: (I commented out the variables since I wasn't using them in an attempt to follow the format from the Server-side Plug-ins article.

<Name>MyMonsterPlugin</Name>
Script
<Scope>Server
<File>plugins\FightPlugin.as</File>
<Variables/>
<!--
<Variables>
<Variable>
<Name>TestVariable</Name>
<Value>Blah Blah, Script test variable</Value>
</Variable>
</Variables>
-->
</Plugin>

*****************
Full Paste below:
*****************


<Name>SimpleActionScriptPlugin</Name>
Script
<Scope>Room
<File>plugins\SimpleActionScriptPlugin.as</File>
<Variables/>
</Plugin>

<Name>SimpleJavaPlugin</Name>
Java
<Scope>Room
<File>com.electrotank.electroserver.plugins.SimpleJavaPl ugin</File>
<Variables/>
</Plugin>

<Name>LoadVarsScriptPlugin</Name>
Script
<Scope>Server
<File>plugins\LoadVarsExample.as</File>
<Variables />
</Plugin>

<Name>VariablesExampleJavaPlugin</Name>
Java
<Scope>Server
<File>com.electrotank.electroserver.plugins.VariablesExa mpleJavaPlugin</File>
<Variables>
<Variable>
<Name>TestVariable</Name>
<Value>Blah Blah, Java test variable</Value>
</Variable>
</Variables>
</Plugin>

<Name>VariablesExampleScriptPlugin</Name>
Script
<Scope>Server
<File>plugins\VariablesExampleScriptPlugin.as</File>
<Variables>
<Variable>
<Name>TestVariable</Name>
<Value>Blah Blah, Script test variable</Value>
</Variable>
</Variables>
</Plugin>

<Name>AbilitiesShowcasePlugin</Name>
Script
<Scope>Room
<File>plugins\AbilitiesShowcasePlugin.as</File>
<Variables/>
</Plugin>



<Name>MyMonsterPlugin</Name>
Script
<Scope>Server
<File>plugins\FightPlugin.as</File>
<Variables/>
<!--
<Variables>
<Variable>
<Name>TestVariable</Name>
<Value>Blah Blah, Script test variable</Value>
</Variable>
</Variables>
-->
</Plugin>

</Plugins>

jobem
11-23-2004, 02:16 AM
Hi Ivan,

Try this instead, Server changed to Room:



<Name>MyMonsterPlugin</Name>
Script
<Scope>Room
<File>plugins\FightPlugin.as</File>
<Variables/>
<!--
<Variables>
<Variable>
<Name>TestVariable</Name>
<Value>Blah Blah, Script test variable</Value>
</Variable>
</Variables>
-->
</Plugin>

townivan
11-23-2004, 02:32 AM
That didn't seem to work. :(

I'm not sure if this is related but sometimes when I connect as a second person to the chat lobby I see the first user as [object Object], in the userlist....
The user list is fine for the 1st person but [object Object], where is should say 1stPersonName.

jobem
11-23-2004, 02:36 AM
If you have the latest ElectroServer, then grab the latest ElectroServer.as class file and use that. It will fix that userlist bug.

But that isn't the problem.

Are you using the same front end from our site? If so then that tries to create a plug-in called FightPlugin I believe, and your plug-in name is MyMonsterPlugin.

So looks like you might have had two problems:
1) You had it as a server plug-in which you just fixed
2) You are probably calling the plugin by the incorrect name.

townivan
11-23-2004, 03:30 AM
Excellent! That did the trick! Thanks so much for your help Jobe. (Michael too).

However I have some questions related to this.

1. At one point I suspected the plugin was being called by the incorrect name. Unfortunately I wasn't able to find where the correct name(reference) was. Is this somewhere in the fight.fla? I was not able to find it.
2. I'm still getting the [object, Object], bug. I grabbed the latest ElectroServer.as class from the download page; extracted it and went into the "Flash MX 2004\as_files" folder (because I'm using flash mx 2004); I copied the ElectroServer.as, Wddx.as, and WddxRecordset.as files and pasted them into my monster folder to update those files. Is this correct? I don't need these files on the server anywhere right?

jobem
11-23-2004, 04:14 AM
Hi townivan,

1) Look inside the popup movie clip in the upper left hand corner of the stage on the Chat frame. Go to the New Game frame label. Look at the code on that frame.
2) Dont' get it from the download page. Get the latest ElectroSErver.as file from the installed examples. The download page isn't up-to-date with the latest class.

townivan
11-23-2004, 07:45 PM
ElectroSever.as from C:\Program Files\Electrotank\ElectroServer 3\Examples\Flash MX 2004\as_files
Which would have been updated when I installed ES 3.6.5 ?
Last edit: 11/11/2004

I put this and the other files in that folder (Wddx.as and WddxRecordset.as) all into my Monster folder to overwrite and update those three files.

I still get the [object, Object], bug. Did I do something wrong?

I start ES.
Then I launch Fight.html for one person, then again for a second person. The second person sees the bug. I don't see anything odd being reported in the "Start ElectroServer" window.