CommonScriptErrors

From Amulets & Armor Wiki
Jump to: navigation, search

Correct Syntax

If your syntax is correct and the compiler is still complaining that a script section is incorrect

Check Whitespace

The most common issue is with white space. The compiler does not like extra tabs. Make sure that there are not extra tabs after each line of code.

Also make sure that between individual script sections there is a single blank line with a newline and no whitespace.

Incorrect

(with sample whitespace markup)

40: // open exit door with switch[newline]
[tab][tab]ChangeSideTexture(1636,"SWIT1U");[newline]
[tab][tab]AreaSound(6007,-16,516,300,255);[newline]
[tab][tab]SlideCeilingNice(200, 0, 16, 32, -1);[newline]
[tab][tab]End();[newline]
[tab][tab][newline]
41: // Move Platform
[tab][tab]SlideCeilingNice(125, 0, 120, 50, -1);[newline]
[tab][tab]End();[newline]

Correct

(with sample whitespace markup)

40: // open exit door with switch[newline]
[tab][tab]ChangeSideTexture(1636,"SWIT1U");[newline]
[tab][tab]AreaSound(6007,-16,516,300,255);[newline]
[tab][tab]SlideCeilingNice(200, 0, 16, 32, -1);
[tab][tab]End();[newline]
[newline]
41: // Move Platform
[tab][tab]SlideCeilingNice(125, 0, 120, 50, -1);
[tab][tab]End();

Back to Scripting Main Page