This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

weeeeee colors!

Old posts that have not been replied to for several years.
Locked
B
BrollY
Voice
Posts: 36
Joined: Wed Apr 23, 2003 9:28 pm
Location: H07 L471N4 L4ND (Puerto Rico)

weeeeee colors!

Post by BrollY »

im guessing the solution might be a simple one, but for someone thats not a big pro with TCL its a bit mind twisting.

simply enough, wat im trying to do is make the bot message this little part of a message to the specified place:

[+0]

i know that i would have to use backslashes to make it interprate the brackets as "normal" chars, but the thing is, i need the plus sign to be green n next to the zero, so i used this:

\[\0039+\003\0\]

i used the second color thing to end the first one, but by doing this little thing, the rest of the complete message gets erased

<bot> (Cluster: 1) (Communities: 24 [+

above is an example of wat the bot says, it pretty much deletes the rest of the message since it seems to get stuck in writing out the [+0] thing.

any help at all will be greatly appreciated
Yo momma's so fat she can be in the past, present, n future all at once
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Why did you escape the 0? it makes it a null byte (\000).
You should consider using \017 (plain text) to escape the color.
B
BrollY
Voice
Posts: 36
Joined: Wed Apr 23, 2003 9:28 pm
Location: H07 L471N4 L4ND (Puerto Rico)

Post by BrollY »

i escaped it since i thought i could end the color code somehow that way
Yo momma's so fat she can be in the past, present, n future all at once
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Escaping a char in your tcl (http://tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M15) doesn't affect how the client render your message, only what you send out to the server.
Did you try that \017 yet?
B
BrollY
Voice
Posts: 36
Joined: Wed Apr 23, 2003 9:28 pm
Location: H07 L471N4 L4ND (Puerto Rico)

Post by BrollY »

yup i tried it, works great, thanks
Yo momma's so fat she can be in the past, present, n future all at once
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

You should realy see my post in the Tcl FAQ forum.

Because colour codes use numbers, it may well be possible that your text may class with the code, because they also contain numbers.

As such, you should use double digit colour codes to get around this.

OK, instead of 4 for red, use 04
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Hey slim...do you ever read private messages? :)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Yes - I am just getting around to looking into it now.
B
BrollY
Voice
Posts: 36
Joined: Wed Apr 23, 2003 9:28 pm
Location: H07 L471N4 L4ND (Puerto Rico)

Post by BrollY »

the point was to end the color scheme, not start it, the \017 thing did the job quickly, u might want to add that to the TCL FAQ just in case
Yo momma's so fat she can be in the past, present, n future all at once
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Please re-read the FAQ. This has been noted since the start, under tyhe heading "Normal text".
B
BrollY
Voice
Posts: 36
Joined: Wed Apr 23, 2003 9:28 pm
Location: H07 L471N4 L4ND (Puerto Rico)

Post by BrollY »

didnt notice it
Yo momma's so fat she can be in the past, present, n future all at once
Locked