PDA

View Full Version : [Question] What kind of variables can be defined when deploying a plugin?



raphaelbaldi
06-29-2011, 07:50 PM
<Plugin>
<Handle>ExampleJavaPlugin</Handle>
<Type>Java</Type>
<Path>com.electrotank.electroserver5.testextension.Sprin gTest</Path>
<Synchronized>true</Synchronized>
<Variables>
<Variable name="Variable1Name" type="string">variable 1 value</Variable>
<Variable name="Variable2Name" type="string">variable 2 value</Variable>
</Variables>
</Plugin>

What types can I use when setting variables this way? Can I use an array for example? An EsObject? Couldn't find it anywhere on the docs.

tcarr
06-29-2011, 08:34 PM
It's easy to overlook it. See XML (http://www.electrotank.com/docs/es5/manual/xml.htm).


Simply write a small Java or Flash program that builds a sample EsObject that would hold the variables you want, then use the EsObject.toXML() method to convert the EsObject to XML. Output it, then copy and paste where needed. Check that the outer level is Variables with an s on the end; some versions of ES5 for some languages omit this needed s.

Note that this won't work with byte arrays. Other types of arrays should work just fine.

daperson1
06-29-2011, 10:18 PM
I think this is the example you'll want:
http://www.electrotank.com/docs/es5/zips/PluginFromXmlToXml.zip