脚本编辑器

From SA-MP Wiki

(Redirected from Scripting Editors ZH)
Jump to: navigation, search

There are currently multiple editors for pawn code around - PawnSciTE, Pawno, SA-MP Editor, and so on. But which one should you use to create your script, or edit others? This page will discuss the benefits and the downsides of the available editors.

Contents

Pawno

Pawno is most probably the most common editor around. It's a very basic editor, which offers exactly what most people need. Features like syntax highlighting, basic run-options and a bar which shows the included functions make pawno the perfect editor for people that create small gamemodes or filterscripts, and people that just want to edit some little things in an existing gamemode. Pawno is created by spookie

Pawno is the most used editor around

优点

  • It's compact in size, low memory use.
  • Perfect for smaller scripts.
  • Function-list next to your script.
  • Packed with the SA-MP Windows Server.

缺点

  • It's unclearly for big scripts, hard to find specific things.
  • The editor is very basic.
  • You have to have an Administrator account on Windows Vista for it to run

总结

Pawno is perfect for the smaller scripts around, you should use another editor when your gamemode/filterscript counts more than 2000 lines. It's also the editor for people with slower computers, since the performance is a big plus here.

下载

Pawno is included with the SA-MP Windows Server, which can be downloaded here.

SA-MP Editor

The second editor is SA-MP Editor, a fairly new editor which just arrived out of closed-beta. SA-MP Editor is a feature-rich pawn-editor, with features like code collapsing, advanced compile options, project support, tabs and of course IntelliSense®. Combine this with info tips, syntax highlighting and options to improve performance, and you have an editor for large gamemodes and filterscripts. SA-MP Editor was created by Peter.

SA-MP Editor is the most feature-rich editor around

优点

  • Native as custom (your-) functions.
  • Project support.
  • Open multiple files with tabs.
  • More advanced compile options.

缺点

  • Odd memory use: one moment it uses 34MB's, the other 3MB.
  • 较旧的计算机可能运行缓慢。
  • 它仍处于测试阶段。
  • 你需要的。NET框架2来运行它。

总结

SA-MP Editor is designed for creating large scripts/gamemodes, and has features like code-collapsing and IntelliSense®. The strange memory use and the fact that it's still in beta are downsides, because errors may occur.

下载

你可以从这里下载SA-MP Editor

PawnoX

PawnoX is, as the name might tell you, an improved version over the original pawno program. With features like more advanced syntax highlighting, a special compile-frame instead of a dialog, and compile options including a restart-function for the SA-MP server. It is designed for people that want features as well as performance. Pawnox has been made by RedShirt.

PawnoX is an improved Pawno

优点

  • A compact and memory-efficient editor.
  • Better compile options then pawno.
  • Improved syntax highlighting.
  • More buttons on the main toolbar.

缺点

  • The development for new features may seem a little slow.
  • Not enough improvements to be a good concurrent for pawno yet.

总结

PawnoX is a very nice editor, but doesn't have enough new features yet to be a real concurrent for pawno. Features like autolist are upcoming though, so things might change in the near feature.

下载

PawnoX can be downloaded here.

Official Quincy Editor

It is possible to alter the official Quincy editor for the pawn language to use the SA:MP compiler. Quincy is both stable and compact, while retaining many advanced features that set it aside from Pawno (especially the fact that it can open theoretically infinite sized files without crashing or slowing down).

Image:Quincy.jpg

优点

  • Compact, memory-efficient.
  • Much better syntax highlighting than Pawno.
  • More features, including code beautifier and variable watcher.
  • Cross-platform.

缺点

  • Your source files have to be renamed to .p or .pawn.
  • Some features seem to not work.
  • Lacks proper syntax highlighting for numbers and functions.

下载

Downloads can be found here

安装说明

  1. Install as normal.
  2. Go to the location of the SA:MP Pawno editor (download the SA:MP server package to get this).
  3. Create a new folder within the Pawno directory and copy everything into it (including the 'include' folder).
  4. Create a folder named 'bin' within the folder you just copied everything into.
  5. Move everything apart from the includes folder into the 'bin' folder.
  6. You should now have a folder containing an 'include' and a 'bin' folder. The 'bin' folder should contain the Pawno compiler and related files and the 'includes' folder should contain the appropriate includes.
  7. Open the Quincy editor.
  8. Go to Options in the Tools menu.
  9. Ensure the Build tab is selected.
  10. Change the compiler path to the directory you made that contains the 'include' and 'bin' folders.
  11. Click OK.
  12. If any errors appear, ensure you followed the instructions exactly.
  13. Rename your source files to .p and enjoy!

PawnSciTE

PawnSciTE is a very powerful, yet easy to use editor built around SciTE, but is completely standalone. It comes with a simple installer and settings application and is still actively developed by Darkimmortal.

PawnSciTE Main Window (very out of date - see forum post for more up to date screenshot)
Enlarge
PawnSciTE Main Window (very out of date - see forum post for more up to date screenshot)

PawnSciTE Function Parameter Tooltips

PawnSciTE Settings Window
Enlarge
PawnSciTE Settings Window

优点

  • Full syntax highlighting including function highlighting for all SA:MP functions.
  • Function Parameter Tooltips
  • Local Server Restarting - Via changemode/reloadfs (Recommended), via GMX or via full restart.
  • Pawno compiler in a sidebar with jump to error!
  • JumpTo Callbacks and JumpTo Functions.
  • Automatic FTP Uploads (Requires Windows XP / Vista).
  • Remote Server Restarting for GTAHost servers.
  • Code Folding.
  • User Friendly Settings Interface.
  • Tabbed Interface - Up to 10 files can be open per instance.
  • Unlimited Buffer for lower lag on large scripts.
  • Project support.
  • Code Completion

缺点

  • No native function list.

下载

SAM[P]CE

San Andreas Multiplayer [Pawn] Code Editor is a new editor developed by Skaty. This editor has many features and they can also be expanded through the use of plugins.

SAM[P]CE

优点

  • Syntax highlighting
  • AutoComplete & Call tips
  • Function Explorer (includes & opened files)
  • MDI (Multiple Documents Interface)
  • Error listing
  • Expand functionality using plugins

缺点

  • It's still in beta.
  • You'll need the .NET Framework 3.5 for it to run.

下载

You can download the SAM[P]CE Here (Works with 0.3)

Pawn Studio

Pawn Studio is an enhanced IDE for Pawn. It isn't specialy build for SA-MP but it has build-in templates in it made for SA-MP.

Pawn Studio

优点

  • Syntax highlighting
  • Code parsing
  • Auto-Indentation
  • Auto-Completition
  • Call Tips
  • Doxygen parsing

缺点

  • Very bright syntax highlighting (Unreadable for some people)
  • You need to specify the compiler (So you need pawno)
  • You can't hide the ToolPanels

下载

QuickPawn

Current Version: 2.1 QuickPawn is a Pawn IDE developed by xXedixXx in Java (making it multi-platform). This IDE has both a compiler for Linux and Windows, and works in Linux, Mac and Windows.

QuickPawn

优点

  • Syntax highlighting
  • AutoComplete
  • Dynamically lists functions in an interactive tree
  • Multi-platform
  • Compiler (both Windows and Linux)
  • Developed in Java for portability
  • Insert -> Code options

缺点

  • The Pawn compiler needs to be installed for Linux (included in download)

下载

You can download QuickPawn Here

其他编辑器插件

Notepad++ 插件

DracoBlue made a special plugin for the notepad++ editor, which can be downloaded on his website. With features like Codefolding, Autocomplete and syntax highlighting, it's an extention for people who are used to Notepad++. Compiling options are currently not supported by default, and setting it up might be hard for some less-experienced people.

Downloads:

Personal tools
Navigation
Toolbox
In other languages