Skip to content
Barnaby Keene edited this page May 13, 2019 · 14 revisions

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!

Common sampctl Installation/Usage Issues

When I Open sampctl.exe a console opens and closes

I guess you've not used command-line tools before, that's okay! sampctl (and all command-line tools, that includes pawncc.exe) are not intended to be Double-Clicked to be used - there is no graphical user-interface.

How you use these tools is via a "Shell" such as PowerShell or Command Prompt. You interact with them by typing commands - it will sound weird if you've used a mouse all your life but trust me, it's often way faster!

So check out this tutorial and start learning how to develop with a terminal!


How do I use Filterscripts with sampctl?

See this guide for help with filterscripts.


Common sampctl package build Errors

fatal error 100: cannot read from file: "a_samp"

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"

General Compiler Troubleshooting

  1. Run your sampctl command with --verbose at the end, for example: sampctl package build --verbose
  2. At the very end of the (long) output, there will be the following message:
INFO: executing compiler in DIRECTORY as [ENV] [COMMAND]

It's the COMMAND bit you're interested in, in the second set of square brackets. This output will be very long so it's probably best to copy the entire thing into Sublime text or an editor of your choice. Remember that there will be a ] at the very end of the command that you must also remove.

Once you've got the command, it should look something like this:

C:/Users/YOURNAME/.samp/pawn/3.10.4/pawncc.exe C:/SERVER_DIRECTORY/gamemodes/barp.pwn -DC:/SERVER_DIRECTORY/gamemodes -oC:/SERVER_DIRECTORY/gamemodes/barp.amx -d3 -;+ -(+ -\+ -Z+ -iC:/SERVER_DIRECTORY/some-include-directory

(Yours will likely be longer, this is just a demonstration, you should have a general idea of what to look for)

Now, you need to run this command on your shell. You should use PowerShell and I will assume Windows here (If you're a Linux or Mac user, reply and I will update this post with an example for your OS). You will need to escape the special characters used for all the flags that are passed to the compiler, this involves enclosing them in ' characters, like so:

C:/Users/YOURNAME/.samp/pawn/3.10.4/pawncc.exe C:/SERVER_DIRECTORY/gamemodes/barp.pwn -DC:/SERVER_DIRECTORY/gamemodes -oC:/SERVER_DIRECTORY/gamemodes/barp.amx '-d3' '-;+' '-(+' '-\+' '-Z+' -iC:/SERVER_DIRECTORY/some-include-directory

Now, run the command in PowerShell and you should see the raw output from the process which will help you (and me!) debug this problem and locate the source.


I Can't find the .inc in a repository

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!

How to Mono-Repos Like Agneese-Saini/SA-MP Work With Dependencies

If you want to use libraries like this, you'll have to download them manually or ask the owner to use Git/GitHub properly.


Maintenance and Updates

How do I update sampctl?

For update instructions, see the respective installation pages: