# Ignition Compile Error

**URL:** <https://forum.inductiveautomation.com/t/ignition-compile-error/80934>\
**Category:** Ignition\
**Created:** [October 24, 2023, 11:27pm UTC](https://forum.inductiveautomation.com/t/ignition-compile-error/80934 "2023-10-24T23:27:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ly17](https://avatars.discourse-cdn.com/v4/letter/l/c57346/32.png) [@Ly17](https://forum.inductiveautomation.com/u/Ly17)\
**Post date:** [October 24, 2023, 11:27pm UTC](https://forum.inductiveautomation.com/t/ignition-compile-error/80934/1 "2023-10-24T23:27:46Z")

</div>

I'm not exactly sure how this happened but I started getting this compile error.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/9/e9adb27ba700a10c5231d9d6dcd28c087634569e.png)

How do you resolve this?

Thanks,

---

<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:** [October 24, 2023, 11:40pm UTC](https://forum.inductiveautomation.com/t/ignition-compile-error/80934/2 "2023-10-24T23:40:14Z")

</div>

The error is telling you that it expects line #5 to be indented, and it isn't. Show your actual code for more precise advice.

---

<div class="post-metadata">

**Author:** ![sherman](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@sherman](https://forum.inductiveautomation.com/u/sherman)\
**Post date:** [October 25, 2023, 12:06am UTC](https://forum.inductiveautomation.com/t/ignition-compile-error/80934/3 "2023-10-25T00:06:25Z")

</div>

If you copy-pasted code, the script editor is **very bad** about consistently handling indents. Something is off about its indent system. Find a row with a red squiggle under it, probably around line 5, and shift+tab the code back to the left margin and then tab it back to where it was. And then maybe do that on the lines above and below it until it seems happy.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 25, 2023, 8:28am UTC](https://forum.inductiveautomation.com/t/ignition-compile-error/80934/4 "2023-10-25T08:28:22Z")

</div>

It could also be that you've mixed tabs and spaces. Python gives you a smack if you do that

---

<div class="post-metadata">

**Author:** ![Ly17](https://avatars.discourse-cdn.com/v4/letter/l/c57346/32.png) [@Ly17](https://forum.inductiveautomation.com/u/Ly17)\
**Post date:** [October 25, 2023, 1:56pm UTC](https://forum.inductiveautomation.com/t/ignition-compile-error/80934/5 "2023-10-25T13:56:56Z")

</div>

Thanks. I couldn't find where the script was located but I found it (in Scheduled) and there was a commented line that was indented and no script to define the function. I deleted the script. Thanks.
