html-like in-game help widget beta 2
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
I don't think it's caused by svn version. I checked my code and if you don't call Script.LuaUI.setPageOptions(newOptions), no options are set and voila there's your error. It's a bug in the widget becouse default option should be used if nothing is set. Anyway, easiest way to fix it is calling Script.LuaUI.setPageOptions(nil).
Let me know if it helped.
Let me know if it helped.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
he is saying try this.BigHead wrote: I don't think it's caused by svn version. I checked my code and if you don't call Script.LuaUI.setPageOptions(newOptions), no options are set and voila there's your error. It's a bug in the widget becouse default option should be used if nothing is set. Anyway, easiest way to fix it is calling Script.LuaUI.setPageOptions(nil).*edits* instead of Script.LuaUI.setPageOptions(newOptions)
Let me know if it helped.
Either comment out the line:
Script.LuaUI.setPageOptions(newOptions)
or try:
calling Script.LuaUI.setPageOptions(nil). instead of Script.LuaUI.setPageOptions(newOptions)
if that doesn't fix it let him know.

My English is worse than I've thought.
You need to call
Script.LuaUI.setPageOptions(newOptions or nil)
before
Script.LuaUI.displayPage(page)
setPageOptions can be used to modify widget size, colors, font and many other things.
There are some default options and newOptions override them. If newOptions is nil, nothing is overrided and defaultOptions are used (options = defaultOptions).
However if you don't call setPageOptions method no options are initialized (options = nil) and you get the error.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
and what file is that line in?
I have looked to no avail
I have looked to no avail
Last edited by Forboding Angel on 02 Dec 2007, 11:44, edited 1 time in total.
what a smart assed thing to do. You know, it isn't like I refuse to help you all the time. Cute that you posted a whole code block.
I can do that to.
Gui_Example_help.lua
OH LAWD
I can do that to.
Gui_Example_help.lua
Code: Select all
Script.LuaUI.setPageOptions(options)
Script.LuaUI.displayPage("unit-guide/some-unit")
Last edited by smoth on 02 Dec 2007, 09:08, edited 1 time in total.
Btw this is code for another widget I wrote:
Ok, so let's all just edit our posts and make them way shorter 
Code: Select all
BFBOC (Big Fucking Block of Code)

Last edited by BigHead on 02 Dec 2007, 12:35, edited 1 time in total.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
That wasn't from the same file smoth. I posted the code block so that you might be arsed to look at it. I didn't know if you have the widget downloaded or not. Also, If I pastebinned it, would you be arsed to click the link?smoth wrote:LULZ bighead, I just wanna say you are a cool dude.
Or omg, the widget could be updated on UF so that it works with the current spring version *gasped*!
The lua shit is spring is becoming more and more like the spring code every week. NEEDS MORE DOCUMENTATION!
Uhm ... could anyone please reupload this widget to UF 
Edit: Never mind, it's still there ...
Forboding Angel: Were you able to fix your problem? I think you don't understand how this widget works. It's not a standalone help anymore. It only provides you with API (=functions that you can call) that displays your page. In order to use those functions you must create your own widget. See gui_example_help.lua for that. It's disabled by default so you need to enable it to see it.
The easiest way to display your page is calling:
I hope it helps ...

Edit: Never mind, it's still there ...
Forboding Angel: Were you able to fix your problem? I think you don't understand how this widget works. It's not a standalone help anymore. It only provides you with API (=functions that you can call) that displays your page. In order to use those functions you must create your own widget. See gui_example_help.lua for that. It's disabled by default so you need to enable it to see it.
The easiest way to display your page is calling:
Code: Select all
Script.LuaUI.setPageOptions(nil)
Script.LuaUI.displayPage(path-to-your-page)
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Bighead, thanks for that clarification.
I was under the impression that it was still a stand alone thing, which is why I couldn't find that line. I was looking in the wrong place.
Yes I have fixed the issue, thanks for the help!
@wasp thanks dude. I Have gone over the wiki, but the wiki isn't a guide so much as it is a list, which to someone who doesn't know lua might as well be written in latin.
@smoth I asked a simple question and didn't understand the answer, so I responded with information about what I was looking at. THere is no point to deride me like that. I had no idea what was going on because it hadn't been explained in a manner that I could understand. Not everyone here knows 50 different languages like you (and that prolly isn't much of an exaggeration), so be a little more patient please.
I was under the impression that it was still a stand alone thing, which is why I couldn't find that line. I was looking in the wrong place.
Yes I have fixed the issue, thanks for the help!
@wasp thanks dude. I Have gone over the wiki, but the wiki isn't a guide so much as it is a list, which to someone who doesn't know lua might as well be written in latin.
@smoth I asked a simple question and didn't understand the answer, so I responded with information about what I was looking at. THere is no point to deride me like that. I had no idea what was going on because it hadn't been explained in a manner that I could understand. Not everyone here knows 50 different languages like you (and that prolly isn't much of an exaggeration), so be a little more patient please.