ID:1528443
 
(See the best response by Ter13.)
Code:
mob/verb/help()
usr << browse(file("help.html"),"window=help")


Problem description:
Eck, I'm willing to bet their might not be anything wrong with this snippet, seeing as to how out of frustration, I copied most of the code directly from the offline reference, but for some reason this doesn't work, and for once I haven't the slightest clue why. It runs a safety check, I respond "Yes.", and nothing happens. This may just be an issue with the file, but then wouldn't it also display an empty or bugged window or something?
Try putting "help.html" inside of single-quotes instead of double-quotes.

If you have an interface (dmf) file included you'll have to use the more modern output() approach with a window containing a browser element.
I tried that, it tells me "File not found."
If it's telling you that then "help.html" must not exist.
...it exsists. The game found it in the double quotes.
the game must find it within the single quotes.

'help.html'


and not double quotes

"help.html"


EDIT: SORRY ABOUT THE PREVIOUS POST I DONE, I DON'T KNOW WHAT I WAS THINKING ;P
In response to Ssj4justdale
Ssj4justdale wrote:
the game must find it within the single quotes.

'help.html'

and not double quotes

"help.html"

EDIT: SORRY ABOUT THE PREVIOUS POST I DONE, I DON'T KNOW WHAT I WAS THINKING ;P

No. He's using file(), using single quotation merely packages it with the .rsc. It'll tell him the file doesn't exist when he uses single quotes if "show all files" isn't checked when he compiles.

The safety check's due to the fact that the folder has a different name than the .dmb, so it defaults to safe mode.
In response to KingDeity
KingDeity wrote:
Ssj4justdale wrote:
the game must find it within the single quotes.

'help.html'

and not double quotes

"help.html"

EDIT: SORRY ABOUT THE PREVIOUS POST I DONE, I DON'T KNOW WHAT I WAS THINKING ;P

No. He's using file(), using single quotation merely packages it with the .rsc. It'll tell him the file doesn't exist when he uses single quotes if "show all files" isn't checked when he compiles.

I am aware of what file() does and all, its just that since he's using file(), regardless of the file existing or not, you get no errors.

If you ignore calling file() and just package it into the .rsc, it doesn't the user/host to modify or create their own "help.html" file and you can also release your game publicly without needing to have "file.html" inside that folder.
KingDeity wrote:
And that's impertinent to what he asked for. You're just imposing your preference.



"Code:


mob/verb/help()
usr << browse(file("help.html"),"window=help")




Problem description:
Eck, I'm willing to bet their might not be anything wrong with this snippet, seeing as to how out of frustration, I copied most of the code directly from the offline reference, but for some reason this doesn't work, and for once I haven't the slightest clue why. It runs a safety check, I respond "Yes.", and nothing happens. This may just be an issue with the file, but then wouldn't it also display an empty or bugged window or something?"


Given that he is experiencing an issue most likely results in the "help.html" file not existing in the directory.



Just because you are mad at me for whatever reason, you do not need to spam this post here.
Yeah true, I'm just an "imcompetent fool" I assume ;p
Best response
You do NOT have to call file2text() to browse an html document to the browser. KingDeity, Ssj4 is right, the file either doesn't exist, or the browser element is not named properly, or set to invisible.
I didn't think there was anything wrong with the code. Thanks, I'll take this advice into consideration, and if all else fails, I will just code the HTML file directly into the code
.<
derp
Can you show me a screenshot of:

1) The directory where the help.html file is located?

2) The browser element with an id of "help"'s properties?

The interface for my current project timesink uses about 14 browsers and embedded html files. I know pretty well what I'm doing with browse() and complex output(), winsets, javascript, html, and CSS. I'm sure we can find the problem if you give us a bit more information about what you are doing.

EDIT: Ironically, I screwed up an HTML tag in a thread where I mentioned I know what I'm doing with HTML.
I apologize for all this nonsense by the way, it appears you were right and the file didn't exist. It was saved as .htm instead of .html, and now I also have the file incoporated into the rsc files thanks to you!
No worries. It's always the little mistakes that are hardest to notice.
^ exactly what he said.