I'm trying to make my own little book system and when you write in it, sign it, title it, ect. it doesn't change unless I read the book again.
How do I make it so after I do the commands it refreshes the browser so you can see the changes instantly?
ID:270705
Aug 1 2006, 1:24 pm
|
|
Aug 1 2006, 1:35 pm
|
|
What I do is put all the browser window code in a seperate proc and call it when I want it to refresh. The only problem is, and it is a problem for me, if you are basing it off something, like lets say the window comes up when you activate the read verb for the journal object, you can still use the hyperlinks even if you are out of the activation range of the verb.
|
In response to Bobthehobo
|
|
I'll try to try it...
|
In response to SSJ-Chao
|
|
There's another problem I came up with...
When I did this: mob Topic(href,href_list[]) if(href_list["Book"]) for(var/obj/books/O in usr.contents) if("writeinbook") O.body = input("What do you want to write in the book?","Write",O.body)as message ReadBook() return if("signbook") O.signed = input("Sign the book with a name","Sign",O.signed)as text ReadBook() return if("title") O.title = input("Title of the book","Title",O.title)as text ReadBook() return It goes through the Write thing, then Sign, then Title but I only want it to do one thing at a time. How do I fix that? |
In response to SSJ-Chao
|
|
chuck an else before your last two if statements
|
In response to Dragon-wars
|
|
I dunno what you just said but I put an else somewhere and now when I click any of them it just does the Write one.
I'm bad at coding ;_; |
In response to SSJ-Chao
|
|
The problem is you have if(TRUE VALUE HERE)... you never asked WHAT to look for in it.
switch(href_list["Book"]) <--- Also, you placed this before for(var/obj/books/O in usr.contents) What happens if you have more than one book? Want to know? It'll ask you the samething over and over until all the books have been looped through. Set up a reference as to which book you edit. - GhostAnime |
In response to GhostAnime
|
|
Oh dang 0.o
How would I fix the multiple book problem? |