ID:167261
 
So, I would want to stop HTML in normal chat (in the [msg], the name ofcourse may be colored, etc) verbs. Any suggestions?
html_encode()/html_decode()
In response to Crashed
Moron as I am, I have no idea where should I put it, on a chat verb like:

mob/verb/ServerTalk(msg as text)
world << "<b>[usr]:</b> [msg]"
In response to Macobo
[html_encode(msg)]
In response to Macobo
Also, a minor suggestion:
mob/verb/ServerTalk(msg as text)
if(!T)return
world << "<b>[usr]:</b> [msg]"


So players can't spam with blank messages.

O-matic
In response to Mysame
Mysame wrote:
[html_encode(msg)]

Ok, lets say I want to add filters to the game - how to combine the [wordfilter(msg)] and [html_encode(msg)]?
In response to Macobo
Here's my easy step-by-step instructions:
  1. Get a brain.
  2. Install the brain.
  3. Teach the brain basic algebra or computer science.

Remember Alegbra 1? If you want to apply f and g to x, it's written f(g(x)).
In response to PirateHead
There was no need to be so rude, you know, but thanks for the tip. I will consider getting a brain (althrough brains are overrated).

It is not really good to be so rude to the poor newbies (yeah, always pick on the small). We all were newbies some time (and some still are) so lets not be so harsh with them (us?).

PS: Sorry for the offtopic. >.>
PS2: We don't have algebra that way here in Estonia (the home of all freakyness), and in comp science we have learned for the last 5 years how to use Windows Word.
Maccy hears a wild laughter from far away
In response to PirateHead
PirateHead wrote:
Here's my easy step-by-step instructions:
  • Get a brain.
  • Install the brain.
  • Teach the brain basic algebra or computer science.

  • Stay nice. Perhaps he doesn't even know what algebra is, there isn't any reason to start picking on him while you know that he is a beginner.

    O-matic
In response to O-matic
Atleast he asks how to stop html. Every game I see that doesn't have html_encode, I just change the styles for :<
In response to Macobo
Mm, that makes me sad.

I really wish BYOND would put up its own computer science university and offer to teach people the basic things. It would improve the quality of our newbies tenfold, for sure! :-)
In response to O-matic
I think that when people first install Byond and make their key, it should direct them to the DM guide. That would reduce the newbs here about 50%.

Anyway, Macobo, you would do this:

mob/verb/ServerTalk(msg as text)
if(!T)return
world << "<b>[usr]:</b> [worldfilter(html_ecode(msg))]" //see?
In response to KirbyRules
KirbyRules wrote:
I think that when people first install Byond and make their key, it should direct them to the DM guide. That would reduce the newbs here about 50%.

Uhh, no. Not all people who create a key want to become a developer.


Anyway, Macobo, you would do this:

> mob/verb/ServerTalk(msg as text)
> if(!T)return
> world << "<b>[usr]:</b> [worldfilter(html_ecode(msg))]" //see?
>


That part was already explained. =P

O-matic
In response to O-matic
O-matic wrote:
KirbyRules wrote:
I think that when people first install Byond and make their key, it should direct them to the DM guide. That would reduce the newbs here about 50%.

Uhh, no. Not all people who create a key want to become a developer.

But some do, so just in case.
In response to KirbyRules
KirbyRules wrote:
I think that when people first install Byond and make their key, it should direct them to the DM guide. That would reduce the newbs here about 50%.

You don't understand. The DM Guide does not give a whole lot of help to people who are severely noobish. If a person already knows one or more programming languages well, the DM guide is a huge help. For the uninitiated, the DM guide might as well be greek.
In response to PirateHead
I didn't even know what coding was before I read it, and now I'm a better coder then my oldest brother(Who's 22)! But I guess that just means I'm smart, doesn't it?
In response to PirateHead
I've never read the DM guide, and I think I turned out alright. Although, I didn't even know there was a F1 help file or a developer forum until I was here for about a month, and didn't notice the Games Forum until earlier this year :x

I need to explore more, but I think when you first install BYOND, it should open http://developer.byond.com/start/, that could be a great help in finding where things are and how to use them.
In response to Mysame
I just take out the tags altogether.
In response to SJRDOZER
SJRDOZER wrote:
O-matic wrote:
KirbyRules wrote:
I think that when people first install Byond and make their key, it should direct them to the DM guide. That would reduce the newbs here about 50%.

Uhh, no. Not all people who create a key want to become a developer.

But some do, so just in case.

Then what about the players? No, I'd rather second to link them to www.byond.com/start, which was said elsewhere in the topic. Links to developing-recourses are there. The DM-guide is rather something to people who want to become a developer, and it'd be a stupid idea to link every single guy who registers to the DM-guide. I'd guess around 9/10 of newbies actually are registering to just develop.

But, uhh, enough. This is already too off-topic.

O-matic
Ontop of all below, you might want to see/use:
http://developer.byond.com/hub/Wizkidd0123/HTMLCensor

O-matic
Page: 1 2