Script ID incorrect: what the code checks before your key
SCRIPT_ID_INCORRECT means the loader asked about a project the service does not have. Your key is never read at that point. The usual cause is an old loader or a cached second stage.
SCRIPT_ID_INCORRECT means the loader asked about a script that the
service does not have. The key has not been judged yet. A loader and a key only work
together when they belong to the same project, and that pairing is what usually
breaks.
What the code says
| Code | Documentation message | Documentation meaning |
|---|---|---|
SCRIPT_ID_INCORRECT |
The provided script ID is incorrect / it does not exist | Script ID does not exist or has been deleted later |
SCRIPT_ID_INVALID |
The provided script ID is in an invalid format | Too short, too long, contains non-hexadecimal characters |
The first code is about whether the ID exists. The second is about whether it is well formed. A malformed ID never reaches the lookup, and the message that comes back tells a seller which of the two they are looking at. The full set is in the error code list.
By the time this code appears, the service has already accepted the client and read the loader's ID. It has not read the key. That is why the error can appear on a key you never used, and why a key you know is valid does not change the answer.
Where the script ID lives
The loader URL ends in a 32-character ID:
/files/v4/loaders/<script-id>.lua. The stub also carries a shorter
value, d049a886a1f in our copy, which it appends -ocmid to,
uses in the cache filename, and passes to the second stage. The two strings are
different, and the documentation does not explain how they relate. The
32-character ID in the URL is what the service uses to serve the loader. The short
value is the stub's own label for the cache and for the argument. Both uses are in
the loader anatomy.
The documentation example shows a 32-character hexadecimal script ID. A key is a separate value, and the two are not interchangeable. The script ID identifies the project. The key identifies a user inside that project.
The loader names the project before anything looks at the user. If the project is missing, the key never gets a turn. The separate lookup only comes after this one (key system).
How a loader and a key get out of step
A seller can recreate a project, which gives it a new ID. The old loader still points at the old one, so it reports the old project as missing even though the key is current.
An old loader saved from an earlier message has the same problem. So does a loader copied from one seller and used with a key from another. The characters can both be valid and still describe different projects.
A cached second stage can keep an old ID alive. If you run an old loader and its cached file is still present, the loader can run that copy without a fresh download and the error returns on every launch. Clearing the cache is part of the fix. The call that deletes the cached second stage is purge_cache().
Renaming the cache file does not change the ID inside the loader. The ID travels in the request, and the filename plays no part. Renaming makes the loader miss the cache and download a fresh second stage. That is how you find out whether an old cached copy was involved.
SCRIPT_ID_INVALID is a different code
The ID is too short, too long or contains characters that are not hexadecimal. This usually comes from an edited URL or a copy that lost characters. The service does not look it up, so no key state can change the result.
If you edited the loader to point at another project, this is what you get. The ID comes from the service and the loader carries it, so there is no value for you to choose.
Fix it in three steps
- Get the loader from the same place as the key, in the same message or dashboard session.
- Run it unchanged. Do not substitute an older saved loader because it looks familiar.
- Clear the cached second stage, then run the loader again.
If the code persists with a fresh loader and a key from the seller, the project is gone or the seller gave you a key for a different project. In that case no local step helps.
When the project is gone
A key can still exist while its project does not. The seller may have deleted the project, recreated it under a new ID, or moved the script to a new one. The key record survives, but there is no script for the loader to request.
Only the seller can reissue the loader or move the key. A hardware reset does not help, because the failure happens before the hardware check. A new key from the same dead project does not help either.
FAQ
Is the script ID the same as my key?
No. The script ID names the project, and the key names a user in that project. The ID is 32 hexadecimal characters in the documentation, and the key is a separate string. The ID appears in the loader URL, and the key is the value you enter or paste at the top of the script.
Where do I find my script ID?
It is in the loader URL the seller gave you, after /loaders/ and before .lua. You do not type it anywhere. The stub also carries a shorter id in its cache name, but that is internal. The seller's dashboard shows the project and its loader. If you only have a one-line loadstring, the ID is inside the URL in that line.
Can I change the script ID in the loader?
No. Changing it produces SCRIPT_ID_INVALID if the value is malformed, or SCRIPT_ID_INCORRECT if it is well formed but does not exist. The ID has to match a project the service still holds. Only the seller can issue a loader for a different project.
Why did it work yesterday and not today?
The project changed on the seller's side, or the loader you ran today is older than the one you ran yesterday. A seller can recreate a project and hand out new loaders while old copies keep circulating. Ask which loader is current before you change anything on your machine.
Does clearing the cache fix SCRIPT_ID_INCORRECT?
It can, if the loader is current and a cached second stage from an older project is running. Clear the cache and run the fresh loader. If the ID itself no longer exists, clearing the cache only removes one cause and the code returns after the next download.
Is SCRIPT_ID_INCORRECT a ban?
No. The code is about the project lookup, not about the key's state. A banned key would produce KEY_BANNED after a valid project was found. This error happens before the service reads the key, so it cannot report a ban.
What if the seller deleted the script on purpose?
Then the loader has nothing to reach, and the key has nothing to open. A new key from the same project will fail the same way. Ask the seller whether the script moved to a new project, and use the loader that belongs to that project if one exists.
Can two projects share a script ID?
The ID identifies one project, and the loader uses it to decide which script to serve. A copied loader from another seller therefore points at that seller's project. Whether a deleted ID is ever reused is not documented, so do not rely on an old loader after a project is recreated.