|
|
|
Scripting FAQ
1. What does SC tell me invalid line continuation? | top |
This message is so misunderstood. Most AM users will tell you to convert all of the // comments in the plugin to /* */ pairs.
Yes this fixes the problem, but in my opinion, the wrong way. The plugin files on this site are currently in WIN32 format. Now if you just read the above FAQ Q/A then you already know what I am going to tell you.
WIN32 and Linux (unix really) use different formats to store text files. For the AdminMod this usually is not a problem since it has been designed to handle both formats of text files.
The problem is in the SC compiler. No it's not a bug. It is a native application doing what it should do. When SC reads a file in Linux, it expects a Linux file. Period. If you give the Linux SC a WIN32 file, it will probably work just fine, unless the sma file contains the characters //.
The best solution is to convert the file to the OS's native format. I suggest you get The Wraith, converters.
|
2. How do I edit this sma file? It looks very strange. | top |
Depending on your OS, you may have a problems editing or compiling your sma files.
WIN32 users may see files that do not have the correct carrage return and line feed combinations. This is because the sma file is in linux format.
Linux users may see files that do not compile with an error message of invalid line continuation. This is because the sma file is in WIN32 format.
Since both operating systems are fully supported by AdminMod, sma files may be in either format.
There are two possible solutions to the problem.
One is to use an editor that supports the reading and conversion of both formats. For Windows I like UltraEdit-32 because it supports the conversion between Linux and Win32 files. Another suggestion that has been made is the Programmers File Editor. Since I don't do Linux, I can't recommend any editors, sorry.
The second solution is to convert the files into the correct format for the OS. You can use d2u (dos2unix) or grab The Wraith, converters that will do the job nicely.
|
8. What is this scripting stuff anyway? | top |
The scripting engine was added to the Admin Mod in version 2. With this engine, server operators can add to the growing list of commands that are avaiable to Admins and players without having to dive into C++.
The scripting language is similar to C, but you don't need to know C to get things done.
|
|
|
|
|