Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions stick around after reload and disable #2378

Closed
Wealthyturtle opened this issue Aug 16, 2019 · 3 comments
Closed

Functions stick around after reload and disable #2378

Wealthyturtle opened this issue Aug 16, 2019 · 3 comments
Assignees
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update.

Comments

@Wealthyturtle
Copy link
Member

Description

Whenever you have a Skript that has a function, for instance a(), and then subsequently replace a() with b() entirely with a Skript reload, calling a() would not result in any parse error

Steps to Reproduce

Load this Skript first:

function a():
    a()

Afterwards, replace the previous Skript with:

function b():
    a()

No parse error will occur

Expected Behavior

When using the Skript:

function b():
    c()

An error will be properly shown to the user
image

But in the above scenario, no such error is given

Errors / Screenshots

Detailed above.

Server Information

  • Server version/platform: Spigot 1.14.4
  • Skript version: Skript 2.4-beta5

Additional Context

@bensku since you have planned to redo Skript's function system, might want to fix this issue as well. Thanks! :)

@Matocolotoe
Copy link
Contributor

Matocolotoe commented Aug 16, 2019

Seems like some functions aren't cleared on a script disable 🤔

@Wealthyturtle
Copy link
Member Author

Yep, can confirm that also...

  1. /sk reload test1
function a():
    a()
  1. /sk disable test1

  2. /sk reload test2

function b():
    a()

Will not throw any parse error

@Wealthyturtle Wealthyturtle changed the title Functions stick around after reload Functions stick around after reload and disable Aug 16, 2019
@bensku bensku added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Aug 17, 2019
@bensku bensku self-assigned this Aug 17, 2019
@bensku
Copy link
Member

bensku commented Aug 17, 2019

I'll try to make sure this is fixed in functions rework.

@bensku bensku added the completed The issue has been fully resolved and the change will be in the next Skript update. label Sep 1, 2019
@bensku bensku closed this as completed Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update.
Projects
None yet
Development

No branches or pull requests

3 participants