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
➜ Bug reports
➜ world.color tell
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Shadowfyr
USA (1,792 posts) Bio
|
| Date
| Sun 23 Jun 2002 09:19 PM (UTC) |
| Message
| Speaking of MXP...
Doing a bit of testing I ran into this. The intent is to return the contents of an invalid tag with a specific color (helpful if debugging so don't rag on me Gammon. lol). The problem is that if you REM the 'world.note sTemp' line and un-REM the world.colortell the colortell appears to disable MXP error checking. i.e. even REMing the offending line and puting the regular note line back to normal doesn't fix it. It appears that the sub is simply never called. Adding an aditional 'world.note " "' after the colortell doesn't fix the problem. Going into and back out of the MXP script settings or I assume turning on/off error checking reenables it, but only as long as you also REM the line causing the problem. This may also be caused by the colornote function, but I haven't tested that.
sub tests (Name, Num1, Num2, Err)
dim sTest, sTemp
sTest = "MXP element: "
'world.note Err
if InStr(1,Err, sTest,1) = 1 then
sTemp = "<" & right(Err,len(Err)-13)
world.note sTemp
'world.colortell "&h1008000","&h00",sTemp
end if
end sub
P.S. It might be helpful if you added a link from the MUSHClient forum directly to the built-in script list, since it is a pain trying to look stuff up by going through two other pages to get there. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Tue 25 Jun 2002 02:06 AM (UTC) |
| Message
|
Quote:
P.S. It might be helpful if you added a link from the MUSHClient forum directly to the built-in script list, since it is a pain trying to look stuff up by going through two other pages to get there.
I'll answer the easy one first - I have done as you suggested.
Quote:
'world.colortell "&h1008000","&h00",sTemp
There are two problems with this line. :)
- The script is "colourtell" (Australian/British spelling of colour) not "colortell". This will cause a script error. When MUSHclient gets a script error it disables the script, so that you don't get the same error message thousands of times in quick succession.
- The hex colours should be shown as "#008000" not "&h1008000" (see script page for "colourtell")
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #2 on Tue 25 Jun 2002 02:07 AM (UTC) |
| Message
|
Quote:
This may also be caused by the colornote function, but I haven't tested that.
You mean the "colournote" function? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Magnum
Canada (580 posts) Bio
|
| Date
| Reply #3 on Tue 25 Jun 2002 03:48 PM (UTC) |
| Message
|
Quote:
1.The script is "colourtell" (Australian/British spelling of colour) not "colortell".
1.The script is "colourtell" (Australian/British/Canadian spelling of colour) not "colortell".
:) |
Get my plugins here: http://www.magnumsworld.com/muds/
Constantly proving I don't know what I am doing...
Magnum. | | Top |
|
| Posted by
| Shadowfyr
USA (1,792 posts) Bio
|
| Date
| Reply #4 on Tue 25 Jun 2002 06:12 PM (UTC) |
| Message
| Oh... That's nice... lol But that is even more confusing then.. It should generate an error to the effect that the script I am trying to call doesn't exist or something. Instead other scripts are executing, but the error checking for MXP is disabled. This is still a bug, just not the one I thought it was. lol Hmm. Sadly if the scripting isn't reporting the error it may just be suspending that subs call in a wait-state sort of thing. First time I have heard of some sort of infinite loop, without a loop. lol
Bloody color/colour conventions... Next thing yah know we will was some script function with the dang british 's' in it where we americans use z. :p lol | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #5 on Fri 28 Jun 2002 06:45 AM (UTC) |
| Message
|
Quote:
1.The script is "colourtell" (Australian/British/Canadian spelling of colour) not "colortell".
The list wasn't meant to be exhaustive. :P
You could probably add "New Zealand", or Kalahn might bop me.
Quote:
It should generate an error to the effect that the script I am trying to call doesn't exist or something.
When I tried that I got a dialog box to the effect that the script routine could not be called. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Shadowfyr
USA (1,792 posts) Bio
|
| Date
| Reply #6 on Fri 28 Jun 2002 06:34 PM (UTC) |
| Message
| >2. The hex colours should be shown as "#008000" not "&h1008000" (see script page for "colourtell")
According to your own docs the color conventions differ from vbscript to javascript as well as perlscript. According to those same docs the &h is the 'correct' convention for vbscript and you also pointed out in another thread as related to an error that using 008000 bugged in vbscript and you had to use 1008000 to make it correctly display such a color.
Needless to say this presents some confusion when trying to use it numerically with some commands and providing it as a string to these new ones. :p You are breaking convention here. While the result is that they may avoid the problem that the other color setting commands have under vscript, it is imho confusing to switch syntax just for these commands. Still.. Nice to know that they won't have the problem I ran into with the other ones.
Anyway.. Very odd that I didn't also get a dialog about not being able to call it. I don't see why it wouldn't, but it just hung the error routine without effecting anything else. Very odd... | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #7 on Fri 28 Jun 2002 10:42 PM (UTC) |
| Message
|
Quote:
According to your own docs the color conventions differ from vbscript to javascript as well as perlscript.
You are confusing a number with a string here. Script routines, like NoteColourRGB, take a number as an argument, and representing colours as numbers, in hex, differ from one language to another. For instance, as a number, the colour "red" could be represented as:
- Decimal: 255
- VBscript hex: &hFF
- Jscript and Perlscript hex: 0xFF
These are all different ways of representing the number 255 in different languages. And yes, in VBscript there was a bug when you tried to use a number with the high-order bit on.
However none of that applies to world.colourtell, because it takes a string argument. The string can be "red", "green", "blue", or if you want to use hex, "#FF0000" (for red). Note two things here:
- The number is quoted, ie. it is "#FF0000" not #FF0000, thus it is still a string.
- This is still the representation for red (ie. the red component comes first). Compare this with red in Jscript which is 0x0000FF. You can see these differences in the MUSHclient "colour picker" (Ctrl+Alt+P).
The scripts "colourtell", "colournote" and so on will accept this "pseudo-number" so you can express colours that are not in the list of "alpha" colour names supported by MUSHclient.
For example, "firebrick" is "#B22222", however you might want to change it slightly, to be "#B22223". Since there is no such colour in the MUSHclient colour list, you would have to use the "HTML" version of representing it. |
- 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.
19,326 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top