SQF Highlighter – Extension

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix table)
m (Add more details)
Line 17: Line 17:
| 2022-03-08: Project start
| 2022-03-08: Project start
|}
|}
This extension highlights and automatically links SQF commands and functions.
== Installation ==
== Installation ==


* Unzip the directory to wiki/extensions/SQFHighlighter
* Unzip the directory to {{hl|wiki/extensions/SQFHighlighter}}
* Add {{ic|wfLoadExtension({{Color|#F33|'SQFHighlighter'}});}} to {{hl|LocalSettings.php}}
* Add {{ic|wfLoadExtension({{Color|#F33|'SQFHighlighter'}});}} to {{hl|LocalSettings.php}}
* There are no settings.
* There are no settings -the extension only allows relative links from {{hl|community.bistudio.com}} and {{hl|community.bohemia.net}}, any other host will create full path links





Revision as of 20:35, 14 March 2022

SQF Highlighter
Description Highlights and links SQF commands and functions
Author Lou Montana
Version 0.5b (continuous updates as of 2022-03-14)
Release Date 2022-03-12: First upload
Project Start 2022-03-08: Project start

This extension highlights and automatically links SQF commands and functions.


Installation

  • Unzip the directory to wiki/extensions/SQFHighlighter
  • Add wfLoadExtension('SQFHighlighter'); to LocalSettings.php
  • There are no settings -the extension only allows relative links from community.bistudio.com and community.bohemia.net, any other host will create full path links


Usage

Using <sqf> tags will auto-generate syntax highlighting and links to the pages.

Examples
Code Result
<sqf/>
-no SQF code provided-
<sqf></sqf>
-no SQF code provided-
<sqf>hint "It Works!";</sqf>
hint "It Works!";
<sqf>
// your code here
hint "good!";
</sqf>
// your code here hint "good!";
<sqf>
#define FADE_IN 3

if (not alive player) then
{
	hint "You are dead";
	cutText ["", "Black", playerRespawnTime];
};

waitUntil { alive player };

sleep 3;
cutText ["Welcome!", "Black in", FADE_IN];
</sqf>
#define FADE_IN 3 if (not alive player) then { hint "You are dead"; cutText ["", "Black", playerRespawnTime]; }; waitUntil { alive player }; sleep 3; cutText ["Welcome!", "Black in", FADE_IN];