Jump to content

dynamic help.xml (answered, ta)


churchill

Recommended Posts

I originally included a help.xml file in my about to be released resource, but in it I mention pressing a key that is server-owner definable in an config.xml file that is also included in the resource.

So, if i want the help.xml file to display the correct key to press, do I need to make it write the help.xml file on the fly when the resource is first started on the server, or is there some other kind of fancy way of doing it? :)

edit:

all sorted - introduced to the joys of the help manager and creating help panels programatically. Much nicer, once you remember to include the helpmanager resource in your meta.xml file :)

Edited by Guest
Link to comment

Definable keys? Well, for as far as I know you can just edit helpmanager (or something) to change the keys. Otherwise you can just make a small script to read something like:

Hello cruel world!

Or..... Something...

And I think xmlNodeGetValue is the right scripting command to read it out. Don't know for sure though... :/

Link to comment

helpTab = call(getResourceFromName("helpmanager"), "addHelpTab",getThisResource(),false) 
helpMsg = "Initial resource description." 
if (enabled == "true") then 
      helpMsg = helpMsg .. "  if feature has been enabled in config, then you can hit  " .. keymap .. " to activate it" 
end 
guiCreateMemo ( 0.05, 0.05, 0.9, 0.9,helpMsg,true, helpTab) 

I'm getting Bad argument @ 'call' on that very first line. I thought it was because originally I'd have been trying to call it from the server side script, but then I realised it would obviously be a client side script, so I moved it. But I still get that error. Because of the error I get the memo appearing attached to nothing (because helpTab is probably nil due to the call failing) and the help window isn't activated when you hit F9, either, so it well and truly screws things up. What am I doing wrong? :S

Do I need to add some permissions or something to a file in order to let my resource use helpmanager?

Link to comment

yes, that was the first thing I checked. Before I start my resource, helpmanager works fine (shows the Freeroam help), but when I run my resource, I get that error on the line above. if I haven't got the answer by tonight I'll try duplicating it in another resource to see if it is still a problem.

Link to comment

Ace didn't give any page link? Mr Hankey did, which was most useful, but from what I can see, that page has no mention of including the helpmanager resource in your meta.xml file? maybe I missed something, but I've not seen it documented on the pages I was looking at. When I was getting errors my immediate thought was that I probably needed to add a reference to it somewhere, as I mentioned in my first post regarding the error - I just needed someone to confirm it :)

Link to comment

The resource must be running to call functions from it. You don't have to include the resource into meta.xml but it must be running. You can add the helpmanager to the list of resources which start with the server and you won't have to include it into meta.xml either.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...