DekiScript 101
- Applies to:
- All MindTouch Versions
- Role required:
- Draft Contributor
New to Expert and have no idea how to use DekiScript? This article introduces the basics of DekiScript, the Expert programming language.
What can I write with DekiScript?
Just like with other programming languages, you can use the following with DekiScript to define your content:
Receiving an error message?
If the computer cannot understand your DekiScript, a bright red message lets you know the location of the invalid code:
"}" expected: /content/body/pre[2], line 5, column 1
This is the DekiScript that led to the above error:
var x =25; if (user.title != "How to Use DekiScript for Programmers") { "If you are a programmer look at this link instead:" let x = 75; } <br/> <br/> x;
The error message states that error is in the fifth line of DekiScript. The number column states how many symbols into the line (count from left to right) the error occurs.
When the column number is 1, the mistake usually occurred at the end of the previous line.
Test yourself
Can you figure out what the issue is in the above example?
- ► Answer
- Yes, you got it. The semicolon at the end of line 4 is missing!
Check your code
- Did you remember to type a semicolon at the end of every line?
- Did you remember to put quotation marks around every line of text?