Squirrel v3.1 Frontend & Compiler

Stormeus

  • VC:MP Developer
  • oh god how did i get here im not good w computer
  • Posts: 1,088
Squirrel v3.1 Frontend & Compiler
« on May 25th, 2017, 06:09 PM »Last edited
Since client-side scripts now support compiled Squirrel files, a common question seems to be how to compile scripts for it. You do not need to compile scripts on the client in order to get working bytecode for it, and compiling your code on the server works fine. However, if this is inconvenient or confusing, Squirrel also has a program for compiling scripts that you can use.

Windows
http://static.vc-mp.org/files/sq3.1_win.zip

Linux
TBA

Usage
Code: [Select]
$ ./sq -h
Squirrel 3.1 stable Copyright (C) 2003-2016 Alberto Demichelis (32 bits)
usage: sq <options> <scriptpath [args]>.
Available options are:
   -c              compiles the file to bytecode(default output 'out.cnut')
   -o              specifies output file for the -c option
   -c              compiles only
   -d              generates debug infos
   -v              displays version infos
   -h              prints help

No 64-bit version is provided since client scripts cannot handle scripts compiled on 64-bit versions of Squirrel.

For the purposes of building client scripts, you'll generally want to use the command sq -c -o myfile.cnut myfile.nut