PDA

View Full Version : Getting ruleset versions (major/minor/etc) as a client not possible?



celestian
May 10th, 2020, 20:49
Is it not possible to use the DB.getVersion/getRulesetVersion data as a client? I even tried an OOB (direct calls to DB.getVersion*()) method and it did not work.

I need to know what rev of the ruleset the system is to set specific values.


I've also tried to have the host side set a "temp" value in the DB and then grab that but OOB is not working properly for even that. The "notify" triggers but never comes back with the handler.



OOB_MSGTYPE_CHECKRULESETVERSIONMAJOR = "getrulesetmajorversion";

...

function onInit()
OOBManager.registerOOBMsgHandler(OOB_MSGTYPE_CHECK RULESETVERSIONMAJOR, handleGetRulesetMajorVersion);
end

...

function notifyGetRulesetVersion()
local msgOOB = {};
msgOOB.type = OOB_MSGTYPE_CHECKRULESETVERSIONMAJOR;
Debug.console("data_options_adnd.lua","notifyGetRulesetVersion","msgOOB",msgOOB);
Comm.deliverOOBMessage(msgOOB, "");
end

function handleGetRulesetMajorVersion(msgOOB)
Debug.console("data_options_adnd.lua","handleGetRulesetMajorVersion","msgOOB",msgOOB);
end


All that ever shows up is the debug for "notifyGetRulesetVersion" and the registered handler "handleGetRulesetMajorVersion" never fires.

Moon Wizard
May 12th, 2020, 22:23
Can you try using Interface.getRulesetInfo; which is tied to the ruleset used, not to the database version?

JPG

celestian
May 12th, 2020, 23:22
Can you try using Interface.getRulesetInfo; which is tied to the ruleset used, not to the database version?

JPG

Thanks for the tip. Didnt know that existed. (missing from refdoc).



Network Notice: Client ruleset download complete
Runtime Notice: s'data_options_adnd.lua' | s'onInit' | s'aStuff' | { s'minor' = #0, s'major' = #0, s'name' = s'2E' }


That is what I see as a client. It shows me the ruleset name but not the current "revision".

As a Host this is what I see.



Runtime Notice: Reloading ruleset
Runtime Notice: s'data_options_adnd.lua' | s'onInit' | s'aStuff' | { s'minor' = #0, s'major' = #33, s'name' = s'2E' }


That does have the "major" (revision).

Would be great if the client saw the same thing.

Moon Wizard
May 12th, 2020, 23:39
Hmm, guess I haven't needed it on client so far; so I'll have to take a look.

Regards,
JPG