# Getting Errors on idents and it doesn't make sense

**URL:** <https://forum.inductiveautomation.com/t/getting-errors-on-idents-and-it-doesnt-make-sense/92333>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 25, 2024, 2:00pm UTC](https://forum.inductiveautomation.com/t/getting-errors-on-idents-and-it-doesnt-make-sense/92333 "2024-06-25T14:00:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miguel\_Villasenor\_Es](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/miguel_villasenor_es/32/60416_2.png) [@Miguel\_Villasenor\_Es](https://forum.inductiveautomation.com/u/Miguel_Villasenor_Es)\
**Post date:** [June 25, 2024, 2:00pm UTC](https://forum.inductiveautomation.com/t/getting-errors-on-idents-and-it-doesnt-make-sense/92333/1 "2024-06-25T14:00:27Z")

</div>

Hello all,

I've been bumping into this "bug" over and over again and its starting to pester me. For whatever reason, and I've noticed it happens more when you copy paste things in the script editor, I get errors regarding indentation.  
 ![Capture](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/3/13b176c2d003fab555a8ebd2ed7bc0b6e2521091.png)

As you can see, the ParentFolder function needed to be spaced over a bit.. There is absolutely no reason for it to need to be indented like that, NONE WHATSOEVER. 😠

**Is this going to cause issues for production?** I have bits and pieces of code like this in other projects as well. If one day this bugged is fixed are our current projects going to crash and result in loss of production?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 25, 2024, 2:03pm UTC](https://forum.inductiveautomation.com/t/getting-errors-on-idents-and-it-doesnt-make-sense/92333/2 "2024-06-25T14:03:10Z")

</div>

> [@Miguel\_Villasenor\_Es](#):
>
> absolutely no reason

Long-standing problem. Not simple to fix while retaining any auto-indent behavior. It has gotten better in recent versions.

> [@Miguel\_Villasenor\_Es](#):
>
> going to cause issues

You bet it will. Get used to fixing indentation after pasting code. 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![Miguel\_Villasenor\_Es](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/miguel_villasenor_es/32/60416_2.png) [@Miguel\_Villasenor\_Es](https://forum.inductiveautomation.com/u/Miguel_Villasenor_Es)\
**Post date:** [June 25, 2024, 2:15pm UTC](https://forum.inductiveautomation.com/t/getting-errors-on-idents-and-it-doesnt-make-sense/92333/3 "2024-06-25T14:15:30Z")

</div>

😭 🥲

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [June 26, 2024, 8:24am UTC](https://forum.inductiveautomation.com/t/getting-errors-on-idents-and-it-doesnt-make-sense/92333/4 "2024-06-26T08:24:42Z")

</div>

The secret is to highlight the entire code block with the desired indentation:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/e/4e198ff76f40621665eb2125da56fcd6cdae3087.png)

Then, in the area where it is to be pasted, _ **make sure there is no indentation at all:** _  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/f/8fd5135989e1a5569a8b8687fe420652e8480f06.png)

When it's done this way, the indentation doesn't get messed up:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/0/80171d258564ae6bb2c06ca4f222e8f7769a5e5a.png)

Copy the entire block even if the indentation of the code that is being copied doesn't match the indentation level that it will need when pasted because the original indentation will be preserved. In this way, the pasted code block can simply be highlighted and moved to where it needs to be with _tab_ or _shift-tab_.
