-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
[Suggestion] Loaded add-on conditional syntax #1449
Comments
I think it's possible to get the addon's name without using it's file name (the name is coded in the plugin) |
Ah right duh... that makes sense |
Already mentioned in #1291 Not sure if I should close this or rather remove it from that list |
I personally think removing from the other list makes more sense @Nicofisi, it's easier at a glance to see specific suggestions when they're separated instead of in some list within a specific issue, and it'll also generally have more detail on its own post 👍 |
Nico when you said its a duplicate, I guess it half is... See what Im proposing is not just a loaded addon condition, but.... that PLUS skript ignoring the code written after it, if it's not loaded.
If skellett isnt loaded, it'll give me an error saying that expression isnt recognized.
|
Idea:
I was thinking it would be cool, if there was a condition, that could tell if a certain add-on was loaded, and if it wasn't, it would ignore all syntax written after that condition.
Reason behind this:
A few times, I have written Skripts to post publicly, but though, hey, what if the person downloading doesn't like this add-on, and doesn't want to use this portion of my Skript. (ex. My FlyCard Skript has a scoreboard... one user may not care about the scoreboard, and prefer to not use the Skellett add-on) Well rather than them having to manually delete this section of the Skript, it would just ignore it if the add-on wasn't loaded. As of right now if I have written code, and the add-on isn't there/loaded, then clearly it'll run a ton of errors in the console saying that expression does not exist.
Example:
or
In the first example if the add-on isn't loaded, it would run something else.
In the second example, it would just ignore the code if Skellett wasn't loaded.
Other Info:
I know that certain add-ons have version numbers, etc in their file names, which could make this harder to make. Maybe rather than just looking for the exact name, maybe look for what's in the quotes (ex: "skellett") would be contained in the name, not just the full name itself.
ex:
Just a few ideas of how it could be done.
Thank you for reading :)
The text was updated successfully, but these errors were encountered: