Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Issues With HTML I Suppose (https://forums.graalonline.com/forums/showthread.php?t=80306)

TheStan 06-30-2008 12:05 AM

Issues With HTML I Suppose
 
1 Attachment(s)
Recently, I've been working on something of a file editor for my own personal use during server developement. But, I seem to be having a problem when it comes to placing the data I've loaded from the server into a GuiMLTextEditCtrl you see. It's not quite having the effect I wanted. :O

Code:
PHP Code:

public function onNodeSelected(objnodenodeslashpathnodedotpath) {
  
temp.data null;
  
temp.text "";
  
  if (!
node.isfile) return;
  if (
node.filedata.length() > 0) {
    
player.chat "Have data!";
    for (
datanode.filedata) {
      
temp.text @= "<br>" data "</br>";
    }
    
FileEdit.text temp.text;
  }


PIC BELOW.

Tigairius 06-30-2008 12:11 AM

Can you show us your creation method for FileEdit? (new GuiMLTextCtrl("FileEdit") {, etc)

Also, try debugging it using
NPC Code:

player.chat = temp.text;


Stephen 06-30-2008 12:14 AM

Quote:

Originally Posted by TheStan (Post 1400119)
Recently, I've been working on something of a file editor for my own personal use during server developement. But, I seem to be having a problem when it comes to placing the data I've loaded from the server into a GuiMLTextEditCtrl you see. It's not quite having the effect I wanted. :O

Code:
PHP Code:

public function onNodeSelected(objnodenodeslashpathnodedotpath) {
  
temp.data null;
  
temp.text "";
  
  if (!
node.isfile) return;
  if (
node.filedata.length() > 0) {
    
player.chat "Have data!";
    for (
datanode.filedata) {
      
temp.text @= "<br>" data "</br>";
    }
    
FileEdit.text temp.text;
  }


PIC BELOW.

<br /> is the newline command in HTML. there is no </br> If you want your text to stay as you stylize it use the predefined tags

<pre>
dogs
cats
kittens
</pre>

cbk1994 06-30-2008 01:15 AM

Quote:

Originally Posted by Stephen (Post 1400126)
<br /> is the newline command in HTML. there is no </br> If you want your text to stay as you stylize it use the predefined tags

<pre>
dogs
cats
kittens
</pre>

No no no, the problem is that the files are being saved with HTML tags in them, if I understand.

Stephen 06-30-2008 01:22 AM

Ah. Well all he's doing is putting new lines in - couldn't he just \n?

TheStan 06-30-2008 01:58 AM

Quote:

Originally Posted by Stephen (Post 1400148)
Ah. Well all he's doing is putting new lines in - couldn't he just \n?

Ah, thank you Stephen. It turns out when I originall had tried that I had the slash the wrong way. :O

Stephen 06-30-2008 02:06 AM

Quote:

Originally Posted by TheStan (Post 1400152)
I had the slash the wrong way. :O

I do that all the time... x_x

[email protected] 07-13-2008 08:25 PM

oh so do i, i was doing something on Era and i had /n instead of \n and it took me a few minutes to figure out why it didn't do a new line

zokemon 07-14-2008 07:18 AM

Don't see how people get / and \ confused considering one is used for division and commenting while the other is for special characters.
// This is a comment
"\\ This is a backslash"

Inverness 07-14-2008 07:28 PM

And you call yourself a scripter.

TheStan 07-14-2008 08:31 PM

Quote:

Originally Posted by Inverness (Post 1403098)
And you call yourself a scripter.

>_<


All times are GMT +2. The time now is 10:20 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.