Spyke
September 18th, 2008, 11:01
I'm having difficulty using getRulesetVersion(). In the documentation it says that this returns a table, though the text would suggest that it simply returns the release number.
In the ruleset base.xml I have the line:
<root version="2.0" release="12">
I am calling getRulesetVersion() from a Host session, and trying to populate it as follows:
local ruleset = {};
ruleset = DB.findNode("charsheet").getRulesetVersion();
If I try to manipulate ruleset as a table I get errors that state that this is a number not a table, e.g. by trying:
print (table.maxn(ruleset));
or
print (ruleset[1].release.getValue());
I have a valid databasenode as DB.findNode("charsheet").getName() returns "charsheet", but the following returns 0:
print (DB.findNode("charsheet").getRulesetVersion());
Any help would be much appreciated.
Spyke
In the ruleset base.xml I have the line:
<root version="2.0" release="12">
I am calling getRulesetVersion() from a Host session, and trying to populate it as follows:
local ruleset = {};
ruleset = DB.findNode("charsheet").getRulesetVersion();
If I try to manipulate ruleset as a table I get errors that state that this is a number not a table, e.g. by trying:
print (table.maxn(ruleset));
or
print (ruleset[1].release.getValue());
I have a valid databasenode as DB.findNode("charsheet").getName() returns "charsheet", but the following returns 0:
print (DB.findNode("charsheet").getRulesetVersion());
Any help would be much appreciated.
Spyke