# Shared scripts not works

**URL:** <https://forum.inductiveautomation.com/t/shared-scripts-not-works/72140>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [April 6, 2023, 10:45am UTC](https://forum.inductiveautomation.com/t/shared-scripts-not-works/72140 "2023-04-06T10:45:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![flavien](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flavien](https://forum.inductiveautomation.com/u/flavien)\
**Post date:** [April 6, 2023, 10:45am UTC](https://forum.inductiveautomation.com/t/shared-scripts-not-works/72140/1 "2023-04-06T10:45:41Z")

</div>

Hi,

I can't use a shared script. I don't know why.  
???

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/8/d8b413ac3884cdc16e4a3988997ccfa96d413f82.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/8/d81a46ec216c65ad0fb8b082ef24e5485d0317f4.png)

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [April 6, 2023, 11:58am UTC](https://forum.inductiveautomation.com/t/shared-scripts-not-works/72140/2 "2023-04-06T11:58:36Z")

</div>

You probably need to set your Gateway Scripting Project,  
[https://docs.inductiveautomation.com/display/DOC80/Project+Library#ProjectLibrary-GatewayScriptingProject](https://docs.inductiveautomation.com/display/DOC80/Project+Library#ProjectLibrary-GatewayScriptingProject)

---

<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:** [April 6, 2023, 12:16pm UTC](https://forum.inductiveautomation.com/t/shared-scripts-not-works/72140/3 "2023-04-06T12:16:42Z")

</div>

Your project script seems to have incomplete functions. So that script will not compile. So that script's failure to compile will cause it to "not exist". Empty folders won't exist.

Delete your broken code from `shared.whatever.schedule`. Save your project.

When calling from tag events, not @jlandwerlen's point. (The script console is not an appropriate scope for testing tag events, nor for testing Perspective action or transform scripts.)

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [April 6, 2023, 12:51pm UTC](https://forum.inductiveautomation.com/t/shared-scripts-not-works/72140/4 "2023-04-06T12:51:10Z")

</div>

> [@pturmel](#):
>
> Delete your broken code

Or add `pass` as the function's body, if you want to keep the functions in there:

```python
def decode(prompt):
    pass

```

---

<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:** [April 6, 2023, 1:03pm UTC](https://forum.inductiveautomation.com/t/shared-scripts-not-works/72140/5 "2023-04-06T13:03:07Z")

</div>

The functions look like they are simply folded, probably to sanitize their contents from public view. Notice the `+` symbol on the left of each of them.

---

<div class="post-metadata">

**Author:** ![flavien](https://avatars.discourse-cdn.com/v4/letter/f/f475e1/32.png) [@flavien](https://forum.inductiveautomation.com/u/flavien)\
**Post date:** [April 6, 2023, 2:57pm UTC](https://forum.inductiveautomation.com/t/shared-scripts-not-works/72140/6 "2023-04-06T14:57:05Z")

</div>

Thanks my problem is solved.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [April 7, 2023, 7:39am UTC](https://forum.inductiveautomation.com/t/shared-scripts-not-works/72140/7 "2023-04-07T07:39:25Z")

</div>

Good catch.  
The line numbers should have been a clue...

Though it appears some of those functions actually did not compile, even if that was for a completely different reason.
