ID:177849
 
chalkboard
icon = 'turfs.dmi'
icon_state = "9"
density = 1
verb
write(msg as text)
set src in view(1)
view() <<"[usr] writes, [msg] on the chalkboard!"
//what here to add the messages
read()
//what here to tell the usr all the messages that have been posted(use browser.)
clean()
set src in view(1)
if(usr.key == "ShadowSiientx")
view() <<"[usr] Cleans the chalkboard."
//delete all messages on chalkboard.
else
usr <<"Your not the teacher!"

[Topic changed by Forum Moderator; original spelling left intact]
chalkboard
icon = 'turfs.dmi'
icon_state = "9"
density = 1
var/board_text = ""
verb
write(msg as text)
set src in view(1)
view() <<"[usr] writes, [msg] on the chalkboard!"
board_text += "[msg] - [usr]\n"
read()
set src in view(1)
usr << board_text
clean()
set src in view(1)
if(usr.key == "ShadowSiientx")
view() <<"[usr] Cleans the chalkboard."
board_text = ""
else
usr <<"You're not the teacher!"
In response to Skysaw
Skysaw wrote:

board_text += "[msg] - [usr]\n"
i get most of this post but why then /n ?
In response to Maz
Maz wrote:
Skysaw wrote:

board_text += "[msg] - [usr]\n"
i get most of this post but why then /n ?

\n inserts a line break in the text, so that a new message won't be on the same line as the previous. a <br> tag would do the same thing.
In response to Skysaw
or you can do this with a few lists, so that your players can choose the message to read, and add replies to messages without making a new topic. I'll let you figure that one out.

I usually define a new atom type called message, but those are special circumstances, and a bit extreme, but it is a LOT easier.

just giving you ideas.