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 ➜ Plugins ➜ Gauges and Compass for Achaea

Gauges and Compass for Achaea

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


Pages: 1  2 

Posted by Speedy999   (4 posts)  Bio
Date Reply #15 on Sun 07 Jun 2009 02:53 AM (UTC)
Message
That is copy and pasted
Top

Posted by Fadedparadox   USA  (91 posts)  Bio
Date Reply #16 on Sun 07 Jun 2009 11:55 AM (UTC)

Amended on Sun 07 Jun 2009 12:00 PM (UTC) by Fadedparadox

Message
I've just had two new people get that error when using the compass plugin. Here's a screenshot one of them posted on another forum:

http://i60.photobucket.com/albums/h12/Kaedinvars/MUSHSCREEN.jpg

They get it upon installation. The compass files linked in the original post are the ones they're using. I'm completely unable to duplicate this error.

What you said in your post, Nick: "85*: local right = compass.location[dir][1] + compass.dimension[dir][1]" about that looking strange, basically I have a table, compass.location, that has the starting point (upper left) of each arrow. I also have compass.dimension defined at the bottom of the plugin, when it's created, to be the dimensions of each arrow. The line makes the right property of the image the left side plus the width.

The origin of the error is the OnPluginBroadcast function. It calls draw which calls create, which is where the error seems to be. It sees compass.location[dir][1] or compass.dimension[dir][1] as nil. Both should be set, and at least when I use it, are. The only thing I could think of is when they're set, it uses the image width/height but even when I don't have the images where the plugin expects, it doesn't error out.

I can't seem to duplicate this error, no matter how hard I try. Any ideas?
Top

Posted by Fadedparadox   USA  (91 posts)  Bio
Date Reply #17 on Sun 07 Jun 2009 09:43 PM (UTC)

Amended on Sun 07 Jun 2009 09:45 PM (UTC) by Fadedparadox

Message
An update, I've narrowed it down to either:

1. compass.location[dir][1] not existing
2. compass.dimension[dir][1] not existing

It gives an error with '?' in it. I am sure that both compass.location[dir] and compass.dimension[dir] exist, as I get a 'cannot index...' error if I delete either of them where they're made. Same with compass.location and compass.dimension. And I get an error with 'compass' in it if I delete compass entirely. I only get the '?' error if it's the key 1 that doesn't exist.

I still can't play with it to find which of the two, or the exact cause, though, since I can't make it happen as the plugin is now.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #18 on Sun 07 Jun 2009 09:45 PM (UTC)
Message
I apologize, I misread the earlier message, the add is not adding something to itself.

The only thing I can see would go wrong is this:


for dir in pairs (compass.directions) do
  WindowLoadImage (compass.name, dir, plugindir .. [[compass/arrow_]] .. dir .. ".bmp")
  compass.dimension[dir] = {}
  compass.dimension[dir][1] = WindowImageInfo(compass.name, dir, 2)
  compass.dimension[dir][2] = WindowImageInfo(compass.name, dir, 3)
end -- for


Now if the file compass/arrow_ne (for example) doesn't exist, then the WindowLoadImage will fail, and the WindowImageInfo will return nil, which would account for the later error.

I would check the return code from WindowLoadImage. Perhaps they didn't load the images where they were supposed to?

- Nick Gammon

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

Posted by Fadedparadox   USA  (91 posts)  Bio
Date Reply #19 on Sun 07 Jun 2009 09:55 PM (UTC)
Message
Ah. Finally.

That worked, thanks Nick. You were right, they must not have the images in the right place.

I tried moving the images before then adding the plugin and it still worked. Guess I did something in the wrong order before, and somehow avoided the error.

Appreciate it!
Top

Posted by Speedy999   (4 posts)  Bio
Date Reply #20 on Mon 08 Jun 2009 10:25 AM (UTC)
Message
Thanks very much for your efforts. Is there anything I should change to fix it?
Top

Posted by Fadedparadox   USA  (91 posts)  Bio
Date Reply #21 on Mon 08 Jun 2009 07:53 PM (UTC)
Message
Delete the plugin and images you have now. Go to my new website and get the file here:

http://sites.google.com/site/trevizemoonflair/mushclient/ncompass

I updated it to not only not error out if the images aren't in the right place, but to also tell you where they should be.
Top

Posted by Speedy999   (4 posts)  Bio
Date Reply #22 on Tue 09 Jun 2009 02:41 AM (UTC)
Message
It works now.

Thanks very much for all your help
Top

Posted by Fadedparadox   USA  (91 posts)  Bio
Date Reply #23 on Tue 09 Jun 2009 05:10 AM (UTC)
Message
Awesome! And my pleasure.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #24 on Tue 09 Jun 2009 08:35 AM (UTC)
Message
Your screenshot site mentioned in the earlier post:

http://sites.google.com/site/fadedparadox/screenshots/gauges-compass.jpg

... gives me:


Forbidden

Error 403



- Nick Gammon

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

Posted by Fadedparadox   USA  (91 posts)  Bio
Date Reply #25 on Wed 10 Jun 2009 01:05 PM (UTC)
Message
Sorry about that! Google quit supporting google pages, in favour of google sites, and so all my stuff had to be moved over. Here's a new image:

http://sites.google.com/site/trevizemoonflair/screenshots/MUSHclient_compass_gauges.png

I fixed the old link too.
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.


75,122 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

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.