ID:178579
 
How would I make the following write code save what has been wrote into it?

Once this is done how would I make the read verb show all that has been writing into or onto the item?

obj/items
List
icon = 'DoodadsSet.dmi'
icon_state = "list"
Wei = 0.2
verb
Get()
set category = ("Commands")
set src in oview(2)
if(src.Move(usr))
oview() << "[usr] gets [src]."
usr << "You get [src]."
usr.Wei += src.Wei
else
usr << "You can't get [src]."

Drop()
set category = ("Commands")
set src in usr
if(src.Move(usr.loc))
oview() << "[usr] drops [src]."
usr << "You drop [src]."
usr.Wei -= src.Wei
else
usr << "You can't drop [src]."

Write3(msg as message)
set name = "Write in list"
set src in view(1)
desc = msg

Read3()
set name = "Read list"
set src in view()
usr << desc


Lee
The basics look pretty solid to me; those verbs look like they should work to set and read back desc, anyway, and the desc var should save with the object. (Of course the question arises: When do you want to save the object? Every time the world is saved? Every time its contents are altered?)

I'm not sure I see what else you want to do with this, unless you're asking how you can keep earlier entries intact.

Lummox JR
In response to Lummox JR
Lummox JR wrote:
The basics look pretty solid to me; those verbs look like they should work to set and read back desc, anyway, and the desc var should save with the object. (Of course the question arises: When do you want to save the object? Every time the world is saved? Every time its contents are altered?)

I'm not sure I see what else you want to do with this, unless you're asking how you can keep earlier entries intact.

Lummox JR

I think it is sorted now as I am going to use
desc += msg
instead of
desc = msg


This was Spuzzum's idea so I will try this and if it doesn't work how I want it to then I will come back for more help :)

Lee