Results 1 to 6 of 6

Thread: Blank lines between each line of code after using Notepad++ or Dreamweaver

  1. #1
    iBot User
    Join Date
    Sep 2012
    Posts
    239
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    46 Post(s)
    Reputation
    23
    Rep Power
    5

    Blank lines between each line of code after using Notepad++ or Dreamweaver

    Ok, so I use Notepad++ to copy stuff from one script to another. I formatted my computer and I don't remember which encoding option or whatever I did that did not create space between lines when copying parts of a script from one to another.

    Example. Using Notepad++ or Dreamweaver, I will copy the lines below to another script:

    if posx > 13050 then;
    gotolabel("exit");
    end;
    After saving and loading the script, iBot will display it like:

    if posx > 13050 then

    gotolabel("exit")

    end
    How to fix this?

    Btw, I have experienced this same problem with Dreamweaver as well. Test it yourself: open your iBot, create an waypoint action and add some random lines of code. Save this script with two different names. Now open both scripts on Notepad++ or Dreamweaver and copy everything from one script to another, and save them.

    The script you copied to will have blank lines between the lines of code when opening it on iBot again.
    Last edited by john86; 01-07-2014 at 02:06 PM.

  2. #2
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    u must delete ";" what create "blank line" in IBot

  3. #3
    iBot User
    Join Date
    Sep 2012
    Posts
    239
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    46 Post(s)
    Reputation
    23
    Rep Power
    5
    Quote Originally Posted by RafiXWPT View Post
    u must delete ";" what create "blank line" in IBot
    This is a workaround, yes, but it was not necessary when I had Notepad++ working fine before formatting my computer.

  4. #4
    iBot User
    Join Date
    Sep 2012
    Posts
    239
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    46 Post(s)
    Reputation
    23
    Rep Power
    5
    ";" is used in other important ways besides providing new lines, > and < for example are saved as &gt; and &lt;.

    I found a way: in Notepad++ I selected all the waypoints, pressed CTRL + F and clicked on the "Replace" tab, in Search Mode I selected "Extended (\n, \r, \t, \0, \x...)" and instructed Notepad++ to replace all the \n for nothing. This is much easier and safer than erasing the ";".

    This invisible "\n", which iBot reads as a new line, is created when you copy a block of text from one script to another. You don't see it, but it's there.

    If anybody knows another way around this issue, please tell me so I can test. If one could change the settings of Notepad++ to not create this \n everytime you paste the text, I think the problem could be solved without doing it manually.
    Last edited by john86; 01-07-2014 at 06:39 PM.

  5. #5
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    \ is for escaping. \n is regular expression for a new line.

    lua doesnt ues ; and xml doesnt use < or >

    when you edit the script in ibot, its lua, when you edit it in notepad, its .xml, thats why it has a ; on the end of each line. when you copy the ; from a script to another and load it in ibot, it is replacing the ; with a new line.

    and vise versa, when you open the script in xml, xml doesnt use < >, so it uses > and < for "greater than" and "less than", ending with a ;, similar to a lot of other languages.

    it's not en issue, a blank line in code wont do anything

    If you like, I can get you a deck of cards?
    Last edited by pink_panther; 01-07-2014 at 11:31 PM.

  6. #6
    iBot User
    Join Date
    Sep 2012
    Posts
    239
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    46 Post(s)
    Reputation
    23
    Rep Power
    5
    It's ugly seeing all those blank lines on iBot UI. It's bad for editing/viewing. Anyway what I said is working just fine, so I'll stick with it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •