-
Notifications
You must be signed in to change notification settings - Fork 32
FAQ
This is a collection of common pitfalls encountered while using sampctl. Hopefully this document remains small as weird UX issues should be fixed in the tool itself. However, some things can't be fixed with code and are just a side effect of learning a new tool. Hopefully this document will help you get up and running with sampctl with no more questions!
So sampctl downloads and installs its own Pawn compiler (Zeex version) into ~/.samp/pawn/<version>
it does not have its own includes because the compiler and the SA:MP includes are separate things that do not depend on each other. Compilers are released on a completely separate cycle to SA:MP versions (and, in-turn, SA:MP includes).
To resolve this, I created a Pawn package for the SA:MP includes which is treated like any other package. It's named samp-stdlib (SA:MP standard library) and can be found here.
In order to to make your build work, simply run:
sampctl package install sampctl/samp-stdlib
It also has version tags so for example, 0.3.8 comes out and you might still use 0.3.7, you must specify the SA:MP server version as the version tag:
sampctl package install sampctl/samp-stdlib:0.3.7-R2-2-1"
Some libraries (especially plugins) often store their .inc files in a subdirectory. For example, check the Zeex/samp-plugin-crashdetect repository, the .inc file is actually in the ./includes/
subdirectory. Another example is kurta999's YSF, the include is actually buried deep in ./sampsvr_files/pawno/include
!
This is easily solved, simply add the path relative to the repository root to the dependency string:
{
"entry": "gamemodes/my_gamemode.pwn",
"output": "gamemodes/my_gamemode.amx",
"dependencies": [
"Zeex/samp-plugin-crashdetect/include"
]
}
This also works fine with versioned dependencies:
{
"entry": "gamemodes/my_gamemode.pwn",
"output": "gamemodes/my_gamemode.amx",
"dependencies": [
"Zeex/samp-plugin-crashdetect/include:^4.18.1"
]
}
On GitHub, while browsing a repository you can hit the t
key to open the file finder and type in .inc
to search for include files.
If the include file is not present in the repository, unfortunately there is nothing sampctl can do! You must pester the repository maintainer to include the Pawn library in the repository (this is good practice anyway). Link them to this section by clicking the 🔗 above and copying the URL!
For update instructions, see the respective installation pages: