Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Miniwindows - basics, about how to create a miniwindow

Miniwindows - basics, about how to create a miniwindow

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Mazarin   (14 posts)  Bio
Date Wed 15 Sep 2010 07:54 AM (UTC)
Message
Hi all!

I have been playing now a bit trying to start with miniwindows (I want to keep track of available potions) after beeing able to finish my combat-trigs. Thanks for the help I've got so far. Without it I would still be where i was when starting!

However, about miniwindows, the first example in the helparticle "Miniwindows in MUSHclient - Create / move / resize" gives an error message. The text:
"win = "test_" .. GetPluginID () -- get a unique name, ensure not empty if outside plugin
WindowCreate (win, 0, 0, 200, 200, miniwin.pos_center_all, 0, ColourNameToRGB("white")) -- create window
WindowShow (win, true) -- show it "

gives when run in immidiate mode as suggested in the article the message:
"Run-time error
World: Aardwolf
Immediate execution
[string "Immediate"]:2: attempt to index global 'miniwin' (a nil value)
stack traceback:
[string "Immediate"]:2: in main chunk"

though I have only copied and pasted the text from the example given in the article without making any changes?

Anyone knows what might be wrong?

Thank you in advance, regds

// Mazarin
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #1 on Wed 15 Sep 2010 07:59 AM (UTC)
Message
Which MUSHclient version are you using? The miniwin table was added in 4.52:

Quote:
10. Added miniwin table of constants into the Lua script space.

See: http://www.gammon.com.au/forum/?id=10345

This lets you use symbolic names (like miniwin.brush_hatch_horizontal instead of 2).

[Commit 754a918]

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #2 on Wed 15 Sep 2010 09:47 PM (UTC)
Message
Correct. On this page for example:

http://www.gammon.com.au/mushclient/mw_creation.htm

I noted "Lua note: Instead of numbers you can use the above "symbolic constants" in Lua (version 4.52 onwards).".

Those pages were recently updated to use the miniwin constants, and if you are using an earlier version they won't work.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,673 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.