I have a question what do I have to do for HTML codes to work in Text, and Name changes. I doesn't work in any of my games. Like <:font color=COLORNAMEORNUMBERHERE>TEXT HERE (NOTE remove the : )
1
2
ID:269814
Oct 18 2005, 11:38 am
|
|
Oct 18 2005, 11:45 am
|
|
Yep..and close the font..I'm not ocmpletely sure about the numbers though cuz I dont use them, but I'm sure you can.
|
In response to Mecha Destroyer JD
|
|
Mecha Destroyer JD wrote:
Yep..and close the font..I'm not ocmpletely sure about the numbers though cuz I dont use them, but I'm sure you can. Still didn't work I just tryed it in my game <font color=ffa500>TEXT HERE</font color> |
In response to Kiyo Takamine
|
|
Should..I use it all the time:
usr << "<font color = red>Hello!</font>" |
In response to Mecha Destroyer JD
|
|
Mecha Destroyer JD wrote:
Should..I use it all the time: usr << "<font color = red>Hello!</font>" <:font color = FFCC66>Kiyo Takamine</font> logged in! (Remove the : ) I just input that into my name in the game and it still didn't show up o.O what am I doing wrong? do I need to enter a code for the numbers? |
In response to Kiyo Takamine
|
|
You need the # character before the hex color value, remove the spaces from your html tag too, and close them!
<font color=#FFCC66>Kiyo Takamine logged in!</font>
|
In response to Kiyo Takamine
|
|
Kiyo Takamine wrote:
Mecha Destroyer JD wrote: usr << "<font color = red>Hello!</font>" <:font color = FFCC66>Kiyo Takamine</font> logged in! you're missing the # in the <:font color = FFCC66> |
In response to Nadrew
|
|
Nadrew wrote:
You need the # character before the hex color value, remove the spaces from your html tag too, and close them! > <font color=#FFCC66>Kiyo Takamine logged in!</font> I just typed that into the chat box in my game and its not working in my game period! Do I have to add in something into my game code? |
In response to Kiyo Takamine
|
|
Yes..When you outptu soemthing to the players screen..ie :
usr << "<font color =whatever> texthere </font>"
Just typing it in won't make it the default font color for the whole game. |
In response to Mecha Destroyer JD
|
|
You don't understand, I enter it in correctly but it never works!
say" <:font color=#FFCC66>Kiyo Takamine logged in!</font> On the chat box its says this Kiyo Takamine: <:font color=#FFCC66>Kiyo Takamine logged in!</font> when It should be that color that I typed in! not the whole code. (Romove the : ) |
In response to Kiyo Takamine
|
|
you could just have the #C0C0C0 in quotes too
|
In response to Kiyo Takamine
|
|
Are you using any libraries? Most social libaries use html_encode() in their say verbs. Even if you're not using a library, it sounds as if you've got html_encode() somewhere in your code.
P.S. You might want to take a look at a recent post I made, as it addresses some concerns related to html and color. |
In response to King Gunnerblast
|
|
King Gunnerblast wrote:
you could just have the #C0C0C0 in quotes too what? anyway I edited my last post |
In response to Kiyo Takamine
|
|
Kiyo Takamine wrote:
King Gunnerblast wrote: He means something like this.
usr<<"<font color=\"#C0C0C0\">Hi.</font>"
Also, make sure you don't have html_encode() anywhere in your game, as what it'll do is prevent HTML, html_encode is called like this: usr<<"[html_encode(msg)]" |
In response to Mega fart cannon
|
|
Hey! Your so helpful! XD I just look through my code and I have html_encode() in my verbs and stuff thanks now I can use HTML thank you! and I have one more question can someone give me a change Text color verb? So that the colors you change to will stay permanent until you log out?
|
In response to Kiyo Takamine
|
|
<font color="#FFCC66"></font>
<font color="#FFCC66">This is what it looks like.</font> |
In response to King Gunnerblast
|
|
Yes, but I don't think the tags will work outside of the "".
|
In response to King Gunnerblast
|
|
King Gunnerblast wrote:
<font color="#FFCC66"></font>
<font color="#FFCC66">This is what it looks like.</font> I know... I fixed it though I found out what the problem is though but now I want a change text color code! |
In response to Kiyo Takamine
|
|
For storing color data, you'll want to use a variable. For displaying it, you'll need to output that variable in your functions somewhere. Alternately, you could change the player's name to include the color data, but I don't advise this route.
client You'll need to create your own method of checking the user's input to see if it is a valid color value; if you don't, the user might abuse this feature to include malicious values. |
In response to Mecha Destroyer JD
|
|
Mecha Destroyer JD wrote:
Should..I use it all the time: usr << "<font color = red>Hello!</font>" Never put space between the attribute (color) and the value (red). This is invalid HTML. It does work in BYOND, but should be avoided at all costs because it's wrong and is not predictable across browsers. I need to find out who started teaching the community this horrible practice, and smack them around. Is there a tutorial or someplace where you learned to do this wrong? Lummox JR |
1
2