[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]  Miniwindows
. . -> [Subject]  Hotspot problem - stack overflow

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Hotspot problem - stack overflow
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Pages: 1  2 

Posted by Nick Gammon   Australia  (18,798 posts)  [Biography] bio   Forum Administrator
Date Thu 12 Aug 2010 09:29 PM (UTC)  quote  ]
Message
Apart from all the other issues I mentioned, like giving the function name, in quotes, without the brackets, and without the ":" symbol, I would upgrade:

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

- Nick Gammon

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

Posted by Mendacitas   (10 posts)  [Biography] bio
Date Thu 12 Aug 2010 04:00 PM (UTC)  quote  ]
Message
I am on 4.43
[Go to top] top

Posted by Twisol   USA  (2,230 posts)  [Biography] bio
Date Fri 06 Aug 2010 10:14 PM (UTC)  quote  ]

Amended on Fri 06 Aug 2010 10:17 PM (UTC) by Twisol

Message
Ah, I see. It's not very obvious :( I've had a lot of people not know that there's a newer version. Maybe putting <a href="http://www.gammon.com.au/forum/?id=10458">;(Beta: 4.55)</a> in the heading in both places would make it more obvious.

Very few of the usual users I see visit the forums, so the forums notice misses a lot of people too.

[EDIT] An email newsletter every time a version is released sure would be nice, IMO. Just a thought :D

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (18,798 posts)  [Biography] bio   Forum Administrator
Date Fri 06 Aug 2010 09:55 PM (UTC)  quote  ]
Message
Also on the "main" (top) page of this forum for MUSHclient (http://www.gammon.com.au/scripts/forum.php?bbsection_id=1) is always a link to the latest version. Right now it says:


Version 4.55 of MUSHclient now released.


- Nick Gammon

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

Posted by Nick Gammon   Australia  (18,798 posts)  [Biography] bio   Forum Administrator
Date Fri 06 Aug 2010 09:52 PM (UTC)  quote  ]

Amended on Fri 06 Aug 2010 09:56 PM (UTC) by Nick Gammon

Message
On the Downloads page just in front of the link to download the file is this announcement:


Want the very latest version?

The version shown on this page is considered the latest stable version. That is, it has been released for a while with no major bugs reported. However often more recent versions are available on the MUSHclient Announcements part of the Forum. Follow that link to see if there is a more recent version announced. Look for a thread with a heading like "Version 4.xx released".


Can't do much more than that.

- Nick Gammon

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

Posted by Twisol   USA  (2,230 posts)  [Biography] bio
Date Fri 06 Aug 2010 09:22 PM (UTC)  quote  ]
Message
It would be nice to at least provide a link to the latest "beta" version announcement topic on the front page.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (18,798 posts)  [Biography] bio   Forum Administrator
Date Fri 06 Aug 2010 09:07 PM (UTC)  quote  ]
Message
Depends which version he is using I guess. That functionality was added in version 4.46, the "official" version of MUSHclient on the Downloads page is 4.43.

Two things would help here:


  • If you are having problems with stuff like miniwindows not behaving as you think they should, add "check ( ... )" around function calls.

    For example:

    
    check (  WindowRectOp(atkwin, 1, 3, 15, 32, 32, ColourNameToRGB("blue")) )
    


    That at least confirms the window exists, the arguments are in range, etc.

  • Advise which version of MUSHclient you are using


He still would have got errors or mis-behaviour about things like passing a function rather than a function name, so upgrading to the latest version is not the only issue.


- Nick Gammon

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

Posted by Larkin   (278 posts)  [Biography] bio
Date Fri 06 Aug 2010 08:32 PM (UTC)  quote  ]
Message
Yeah, I was 99% sure that we could do hotspots without plugins for the last few versions, but I haven't tried them yet myself.
[Go to top] top

Posted by Twisol   USA  (2,230 posts)  [Biography] bio
Date Fri 06 Aug 2010 05:13 PM (UTC)  quote  ]
Message
Worstje said:

Been talking to Mendacitas on AIM, and the issue was that he wasn't doing it in a plugin, getting 30035 as the WindowAddHotspot error code.


Wasn't that changed? I swear that was changed. =/

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Worstje   Netherlands  (867 posts)  [Biography] bio
Date Fri 06 Aug 2010 01:52 PM (UTC)  quote  ]
Message
Been talking to Mendacitas on AIM, and the issue was that he wasn't doing it in a plugin, getting 30035 as the WindowAddHotspot error code.
[Go to top] top

Posted by Mendacitas   (10 posts)  [Biography] bio
Date Fri 06 Aug 2010 01:29 PM (UTC)  quote  ]
Message

atkwin = "knightattacks"
dslcolor = "silver"

function knightAI:attackwindow()
WindowCreate (atkwin, 640, 325, 175, 200, 6, 2, ColourNameToRGB("black"))
WindowShow (atkwin, true)
WindowFont (atkwin, "a","Trebuchet MS", 12, true, false, false, false)
WindowFont (atkwin, "f","Trebuchet MS", 10, true, false, false, false)
WindowText (atkwin, "f","Attacks:", 4, 0, 0, 0, ColourNameToRGB ("lightgreen"), false)
WindowText (atkwin, "a","DSL", 4, 13, 0, 0, ColourNameToRGB (dslcolor), false)
WindowText (atkwin, "a","SSL", 6.5, 30, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "a","IMPALE", 4, 47, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "a","HELLSIGHT/ARC", 40, 13, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "a","DISEMBOWEL", 40, 30, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "f", "Spells:", 5, 67, 0, 0, ColourNameToRGB ("lightgreen"), false)
WindowText (atkwin, "a","ENGAGE", 4, 80, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "a","PIETY", 75, 80, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "a","HEAL", 4, 97, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "a","REVIT", 55, 97, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "a","DEMONS", 4, 114, 0, 0, ColourNameToRGB ("silver"), false)
WindowRectOp(atkwin, 1, 3, 15, 32, 32, ColourNameToRGB("blue"))
WindowAddHotspot(atkwin, "dsl", 3, 15, 32, 32, "", "", "", "", "knightAI.modatk", "", 1, 0)

end



function knightAI:modatk()
Note("hotspot working")
end
[Go to top] top

Posted by Mendacitas   (10 posts)  [Biography] bio
Date Fri 06 Aug 2010 11:56 AM (UTC)  quote  ]
Message
I changed the hotspot syntax to pass the name of the function, and simplified the function so I could test only the hotspot. Still when I click on the hotspot nothing happens. I wondered if I'd placed the hotspot improperly so I made a rectangle with the same dimensions in the window. Found that I'd made a tiny line for a hotspot. So I worked out the dimensions I wanted with the rectangle, then rewrote the hotspot to fit it. Still, nothing happening when I click inside the rectangle/hotspot.


atkwin = "knightattacks"
dslcolor = "silver"

function knightAI:attackwindow()
WindowCreate (atkwin, 640, 325, 175, 200, 6, 2, ColourNameToRGB("black"))
WindowShow (atkwin, true)
WindowFont (atkwin, "a","Trebuchet MS", 12, true, false, false, false)
WindowFont (atkwin, "f","Trebuchet MS", 10, true, false, false, false)
WindowText (atkwin, "f","Attacks:", 4, 0, 0, 0, ColourNameToRGB ("lightgreen"), false)
WindowText (atkwin, "a","DSL", 4, 13, 0, 0, ColourNameToRGB (dslcolor), false)
WindowText (atkwin, "a","SSL", 6.5, 30, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "a","IMPALE", 4, 47, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "a","HELLSIGHT/ARC", 40, 13, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "a","DISEMBOWEL", 40, 30, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "f", "Spells:", 5, 67, 0, 0, ColourNameToRGB ("lightgreen"), false)
WindowText (atkwin, "a","ENGAGE", 4, 80, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "a","PIETY", 75, 80, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "a","HEAL", 4, 97, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "a","REVIT", 55, 97, 0, 0, ColourNameToRGB ("silver"), false)
WindowText (atkwin, "a","DEMONS", 4, 114, 0, 0, ColourNameToRGB ("silver"), false)
WindowRectOp(atkwin, 1, 3, 15, 32, 32, ColourNameToRGB("blue"))
WindowAddHotspot(atkwin, "dsl", 3, 15, 32, 32, "", "", "", "", "knightAI.modatk", "", 1, 0)

end



function knightAI:modatk()
Note("hotspot working")
end
[Go to top] top

Posted by Nick Gammon   Australia  (18,798 posts)  [Biography] bio   Forum Administrator
Date Thu 05 Aug 2010 09:51 PM (UTC)  quote  ]
Message
Just to clarify the difference:


print ("math.abs")     --> "math.abs"    (the name of the function)

print (math.abs)       --> function: 01FDC8C8  (the function itself)

print (math.abs (-1))  --> 1   (the result of calling the function)


- Nick Gammon

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

Posted by Nick Gammon   Australia  (18,798 posts)  [Biography] bio   Forum Administrator
Date Thu 05 Aug 2010 09:44 PM (UTC)  quote  ]
Message
I've amended the documentation to make it clearer you pass the name of a function, not a function.

- Nick Gammon

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

Posted by Twisol   USA  (2,230 posts)  [Biography] bio
Date Thu 05 Aug 2010 09:12 PM (UTC)  quote  ]
Message
Nick Gammon said:


WindowAddHotspot(atkwin, "dsl", 3, 12, 25, 12, "", "", "", "", knightAI:modatk, "", 1, 0)

That is the function but not the name of a function.

It's in fact invalid, the : syntax can only be used when calling a function.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[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.


3,991 views.

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

[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

[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]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]