-
Notifications
You must be signed in to change notification settings - Fork 0
Home
ffredyk edited this page Jul 24, 2026
·
9 revisions
Welcome to the SQ# wiki — complete documentation for the SQ# scripting engine.
- Getting Started — installation, architecture, quick start
- Language Guide — syntax, variables, operators, precedence
- Type System — all types, nil/nothing/void, type checking
- Control Flow — if/else, while, for, forEach, switch, try/catch
- Functions & Code — call/spawn/execVM/compile, params, closures
- Strings & Text — literals, interpolation, formatting, manipulation
- Arrays & Collections — arrays, hashmaps, namespaces
- Concurrency & Multithreading — schedulers, fibers, spawnOn
- Promise System — ScriptHandle, await, timeout, combinators
- Thread Safety — freeze/thaw, shared, ownership model
- Host API & Embedding — C# integration, command registration, game loop
- CLI Tool — run, repl, compile, lex, parse
- Bytecode Reference — opcodes, instruction set, VM architecture, binary format
- Multiplayer — remoteExec, publicVariable, scheduler=machine
- Syntax Sugar — optional SQF enhancements
- Optimization Guide — performance tips and best practices
- Benchmarks — SQ# vs Arma 3 performance analysis
- For SQF Scripters — differences from Arma 3 SQF
- For .NET Developers — embedding SQ# in C# apps
Each page documents one command with its arity, behavior, usage examples, and thread safety.
- + — addition / string concatenation
- - — subtraction / negation
- * — multiplication
- / — division
- % — modulo
- ^ — power (exponentiation)
- min — smaller of two
- max — larger of two
- == — equal
- != — not equal
- < — less than
- > — greater than
- <= — less than or equal
- >= — greater than or equal
- count — array/string length
- select — element at index
- pushBack — append element
- append — append array
- deleteAt — remove by index
- deleteRange — remove range
- resize — change size
- reverse — reverse in-place
- sort — sort in-place
- find — search index
- in — membership check
- forEach — iterate
- freeze — make immutable
- thaw — make mutable copy
- isFrozen — check if frozen
- str — value to string
- format — sprintf-style format
- parseNumber — string to number
- toArray — string to code array
- toString — code array to string
- splitString — split by separator
- joinString — join with separator
- toLower — lowercase
- toUpper — uppercase
- trim — remove whitespace
- abs — absolute value
- floor — round down
- ceil — round up
- round — round to nearest
- sqrt — square root
- sin — sine
- cos — cosine
- tan — tangent
- asin — arc sine
- acos — arc cosine
- exp — natural exponential
- log — natural logarithm
- atan2 — 2-argument arc tangent
- pow — power (command form)
- random — random float
- selectRandom — random element
- selectRandomWeighted — weighted random pick
- createHashMap — empty hashmap
- createHashMapFromArray — from key-value array
- get — get value by key
- set — set key-value pair
- call — synchronous execution
- spawn — asynchronous execution
- execVM — load and spawn file
- compile — runtime compilation
- callUnscheduled — execute outside scheduler
- sleep — suspend fiber
- await — wait for handle
- timeout — race against timer
- terminate — force-resolve handle
- scriptDone — check handle status
- canSuspend — check suspension allowed
- spawnOn — spawn on specific scheduler
- currentScheduler — current scheduler ID
- clientOwner — SQF compat alias
- allSchedulers — all scheduler IDs
- schedulerName — name by ID
- schedulerExists — check ID valid
- schedulerBudget — read budget
- setSchedulerBudget — set budget
- fiberCount — total fibers
- readyFiberCount — ready fibers
- waitingFiberCount — waiting fibers
- schedulerLoad — load percentage
- sendTo — transfer array ownership
- scheduler — get value owner
- isSchedulerLocal — ownership check
- shared — atomic variable declaration
- add — atomic add
- sub — atomic subtract
- compareSwap — atomic CAS
- print — generic output
- hint — on-screen hint
- systemChat — system chat
- diag_log — diagnostic log
- diag_tickTime — monotonic timer
- isServer — server check
- isDedicated — dedicated server check
- hasInterface — UI check
- isClient — client check
- player — player reference
- allPlayers — all player IDs
- remoteExec — remote execution
- remoteExecCall — remote call
- publicVariable — broadcast variable
- publicVariableServer — send to server
- publicVariableClient — send to client
- owner — object owner
- netId — network ID
- objectFromNetId — lookup by net ID
- didJIP — joined in progress
- didJIPOwner — JIP owner
- params — array destructuring
- Getting Started
- Language Guide
- Type System
- Control Flow
- Functions & Code
- Strings & Text
- Arrays & Collections
- Concurrency
- Promise System
- Thread Safety
- Host API & Embedding
- CLI Tool
- Bytecode Reference
- Multiplayer
- Syntax Sugar
- Optimization Guide
- Benchmarks
- count
- select
- pushBack
- append
- deleteAt
- deleteRange
- resize
- reverse
- sort
- find
- in
- forEach
- freeze
- thaw
- isFrozen
- currentScheduler
- clientOwner
- allSchedulers
- schedulerName
- schedulerExists
- schedulerBudget
- setSchedulerBudget
- fiberCount
- readyFiberCount
- waitingFiberCount
- schedulerLoad
- sendTo