Testing a Gamemode
Catch mistakes before your players do.
Validate every file
The compiler checks syntax, types, callbacks and native names without starting the server.
bash
knight -check Gamemodes/*.sa
A clean file prints a summary:
text
ok: 16 events, 1 config blocks
Inspect the syntax tree
If an expression behaves unexpectedly, dump how the parser read it:
bash
knight -ast Gamemodes/bare.sa
Test on a local server
- Run the server on a spare port (
port 7778) and connect with the SA-MP client. - Test both a 0.3.7 and a 0.3.DL client if you ship custom models.
- Try bad input on purpose: wrong command arguments, cancel dialogs, disconnect mid-flow.
- Watch the server log for warnings while you play.
Before going live
knight -checkpasses with no errors.- The gamemode gate (
request_class/request_spawn) works for new and returning players. - Database file paths exist and are writable.
- Custom model files exist (0.3.DL) and 0.3.7 clients still connect.
Tip
Add
knight -check to your CI or a pre-commit hook so a broken .sa file never reaches the server.