[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Tips and tricks
. . -> [Subject]  Image in Miniwindow
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Image in Miniwindow

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by WizardsEye   (24 posts)  [Biography] bio
Date Fri 20 Feb 2009 09:25 AM (UTC)  quote  ]
Message
I wanted to personalize my things a bit by putting an image for each of my characters in the upper right hand screen. Here's what I tried using the Cntr+I

WindowLoadImage win, "im1", "C:\Program Files\MUSHclient\worlds\New Worlds\lykan.bmp"
WindowDrawImage win, "im", 100, 100, 0, 0, 6, 3

When I try to run it. The following error shows up:

Argument not optional: 'WindowDrawImage'

Am I doing something wrong here?
[Go to top] top

Posted by Nick Gammon   Australia  (19,470 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Fri 20 Feb 2009 09:06 PM (UTC)  quote  ]
Message
If you look at the documentation for WindowDrawImage it actually takes 11 arguments. You have supplied 8. Hence the error message.


http://www.gammon.com.au/scripts/doc.php?function=WindowDrawImage

However if all you want to do is display a character image, this isn't the easiest way. Images drawn with WindowDrawImage have to be displayed inside a miniwindow, the code to create which, you haven't shown.

See this:

http://www.gammon.com.au/mushclient/mw_other.htm#SetForegroundImage

With a single line of shorter code, you can display an image in the corner.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by WizardsEye   (24 posts)  [Biography] bio
Date Reply #2 on Fri 20 Feb 2009 11:47 PM (UTC)  quote  ]
Message
GAH I must be an idiot some days. I was looking at the the images and not seeing the code for it. Just one minor thing I had to do was remove the parenthesis. Apparently the system didn't like it. Thank you for your patience.
[Go to top] 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.


1,945 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]