Difference between revisions of "Papyrus Compiler Reference"

759 bytes added ,  06:59, 15 April 2017
no edit summary
imported>SLiesegang
imported>Serenity
 
(2 intermediate revisions by 2 users not shown)
Line 26: Line 26:


This command line parameter specifies a list of folders that the compiler will look in for other scripts and the flag file. You'll want to at least point this at the folder that contains all the game's base scripts. Multiple folders are separated by semicolons.
This command line parameter specifies a list of folders that the compiler will look in for other scripts and the flag file. You'll want to at least point this at the folder that contains all the game's base scripts. Multiple folders are separated by semicolons.
If you happen to have multiple import sources, make sure that none of these have scripts with matching names. Only the first occurrence will be imported, every other source of the same name is ignored.


==== Output ====
==== Output ====
Line 54: Line 56:
Common errors emitted by the compiler are listed on [[Papyrus Compiler Errors|another page]]
Common errors emitted by the compiler are listed on [[Papyrus Compiler Errors|another page]]


== Disassembling scripts with PapyrusAssembler.exe ==
PapyrusAssembler must be in the same directory as your pas/pex files. This does NOT convert pex files to psc files, it converts them to a semi readable assembly-like syntax.
<pre>PapyrusAssembler.exe scriptWithoutExtenstion -D</pre>
===Decompile all pex files in a directory===
From cmd:
<pre>for /F "tokens=*" %F in ('dir /b *.pex') do PapyrusAssembler.exe %~nF -D -Q</pre>
From a batch file:
<pre>for /F "tokens=*" %%F in ('dir /b *.pex') do PapyrusAssembler.exe %%~nF -D -Q</pre>
{{Languages}}
[[Category: Scripting]]
[[Category: Scripting]]
[[Category: Papyrus]]
[[Category: Papyrus]]
Anonymous user