Tag Archives

Archive of posts published in the category: Valve

Squirrel – Valve Developer Community

<Squirrel Language> Squirrel is a programming language similar to Lua, but uses a C like syntax. In Source Squirrel is used as one of the scripting languages in the VScript scripting system. The official Squirrel documentation can be found here

Squirrel heavily uses an associative array data structure called a table. Both the keys and values of a table can contain almost any kind of variable. The scripting environment consists of nested tables, and when a script is executed its variables and functions are added as table slots.


Squirrel has two kinds of variables; table slots and local variables. Since the execution scope is always a table, any variables declared outside functions will always be table slots. Table slots have to be declared using the <- operator.

Variables local to functions can be declared using the local keyword.

Global variables are simply slots in the root table, and can be

Read More