ID:164482
 
I have never understood why this doesn't work for me. I can't "change" the messages I output, like or
or anything like that. This is the closest i've got:
            src<<"\
<center>Welcome to my game.</center>\
<center>You can touch the dust but please don't write in it!</center>\
<center>HAVE FUN!</center>"

That almost works as I want, except the message is this:

Welcome to my game.

You can touch the dust but please don't write in it!

HAVE FUN!

And I want it to say this:

Welcome to my game.
You can touch the dust but please don't write in it!
HAVE FUN!

Is there anyway around this? Also can someone show me an example of exactly how to use things like and ? thanks.
Adam753 wrote:
I have never understood why this doesn't work for me. I can't "change" the messages I output, like <size> or <center> or anything like that. This is the closest i've got:
>           src<<"\
> <center>Welcome to my game.</center>\
> <center>You can touch the dust but please don't write in it!</center>\
> <center>HAVE FUN!</center>"

>

That almost works as I want, except the message is this:

Welcome to my game.

You can touch the dust but please don't write in it!

HAVE FUN!

And I want it to say this:

Welcome to my game.
You can touch the dust but please don't write in it!
HAVE FUN!

I prefer using things like a browser to display things like that, for example:

var/game = {"
<html>
<body>
<title>My Game</title>
<center>Hi, welcome to my game</center>
<p>
<marquee>News!</marquee>
<font color=red>Put whatever you want here..</font>
<hr>
HTML Browser by: Adam753
</body>
</html>
"}

src << browse(game)


But, if you want to space it out, just use <*p> tags or <*br> tags if you, so wish. Without, the *'s.
The reason for the extra spacing is that it is caused by the opening and closing of the <center> tags. You can make them run like you want by doing this:
src<<"\
<center>Welcome to my game.<br>\
You can touch the dust but please don't write in it!<br>\
HAVE FUN!</center>"

Where you only use a single tag to enclose the whole thing, and use the <br> tag to end the line.

<size> isn't a tag, but you could use <font size="1"> to resize text, or <font color="#ff0000"> to color it (you should probably search Google for hexadecimal help with RGB values). As well, you could use a <span> tag with the values in its style attribute, but that would require you to learn CSS to manipulate such properties.

Hiead
In response to Hiead
Well that looks good, only one problem. I've been mucking around a bit and this is what I got:
src<<"<center><font color='#ff0000'><font size=3>Welcome to my game.<br>\n<font color='#0000ff'>You can touch the dust but please don't write in it!<br>\n</color><font size=5><font color='#aabbcc'>HAVE FUN!</color></size></center>"

(Yes I know, it's a very long line :P ) This is so close to what I want, there's just one thing: The words "HAVE FUN" don't center! What's wrong?

Oh and one other thing, Are there tags for bold, italic, underline and font type? thanks again.
In response to Adam753
I've noticed one thing, when you end your tags you use <*/color> instead of <*/font>.
In response to Adam753
To tell you the truth, there's tags for everything.

For bold: b
For italics: i
For underline: u

And for fonts, put an attribute to font called face.

So something like font face="forte" with a closing /font
In response to Adam753
Close your friggin' font tags. Hiead already told you that color and size are not HTML tags, so why are you going to go an use 'em anyway? Anyhow, just for simplicity, I recommend you place that stuff in the client.script variable and color that stuff by use of span class. It'd also save you a little bandwidth as there is not so much data to send to the client.

client
script = "<style>.class1{color: #ff0000; font-size: 3;}\
.class2{color: #0000ff;}\
.class3{color: #aabbcc; font-size: 3;}"


src<<"<center><span class=class1>Welcome to my game.</span><br><span class=class2>You can touch the dust but please don't write in it!</span><br><span class=class3>HAVE FUN!</span></center>"


For future reference, you do not need macro linebreaks and HTML linebreaks. I'd also suggest that you control all font tags with one tag. That's how their supposed to be done.

Not this way:
<font color=red><font size=4><font face=Tahoma>

That is bad and wrong. There should be a new word for it, it's so band and wrong, like badwrong, or badong. Yes, that format is badong.

The right way. :D
<font color=red size=4 face=Tahoma>

I know, magical right? Who knew you could save so much space and bandwidth and closing tags by using just one font tag for all attributes? :D
In response to CaptFalcon33035
Yeah, i understand. Cool! but i'm still getting something wrong, because when I do it like that, nothing centers except "welcome to my game".
EDIT: hang on, so maybe if I write t like this:
"<center><font color=RED size=3><b>Welcome to my game.</b><br>\
<font color=BLUE><u>You can touch the dust but please don't write in it!</u><br>\
</color></font><font size=5 color=SILVER><i>HAVE FUN!</font></i>"

I've broken it down a bit so there isn't so much scrolling to read the whole thing, but just pretend it's one line ok?
So, i'm back where I started. It's more "efficient" thanks to Falcon's help, but it's no different because HAVE FUN doesn't center...
In response to Adam753
Because you're still using a closing <color> tag. There is no such tag. Remove that, and it will work.

~X