Difference between revisions of "FAQ: My Script Doesn't Work!"

Jump to navigation Jump to search
225 bytes added ,  19:18, 10 February 2012
no edit summary
imported>Jimhsu
imported>Jimhsu
Line 53: Line 53:


Skyrim also includes [[:Category:Console_Commands|console commands]] that can help you track down what might be the problem. If your script is attached to a quest, type in “'''[[ShowQuestVars|sqv <quest>]]'''” into the console to get a list of every Papyrus script attached to the quest, and the contents of all its variables and properties. If your script is attached to a reference, target the reference with your mouse while the console is up (or use the “'''[[PickRefByID|prid <reference id>]]'''” command) and then type in “'''[[ShowVars|sv]]'''” to see the same amount of information, but for the reference. (PgUp and PgDown scroll the console output!) If your script is supposed to be registered for update events, type in “dpu” to have the game dump a list of every single updating form to the Papyrus log so you can see if your script is there. Or, if you think your script might actually be stuck inside an infinite while loop, or taking a while to respond, “dps” will dump everything Papyrus is currently doing to the log for your analysis.
Skyrim also includes [[:Category:Console_Commands|console commands]] that can help you track down what might be the problem. If your script is attached to a quest, type in “'''[[ShowQuestVars|sqv <quest>]]'''” into the console to get a list of every Papyrus script attached to the quest, and the contents of all its variables and properties. If your script is attached to a reference, target the reference with your mouse while the console is up (or use the “'''[[PickRefByID|prid <reference id>]]'''” command) and then type in “'''[[ShowVars|sv]]'''” to see the same amount of information, but for the reference. (PgUp and PgDown scroll the console output!) If your script is supposed to be registered for update events, type in “dpu” to have the game dump a list of every single updating form to the Papyrus log so you can see if your script is there. Or, if you think your script might actually be stuck inside an infinite while loop, or taking a while to respond, “dps” will dump everything Papyrus is currently doing to the log for your analysis.
===I can't remove an item from a player===
*If you are using AddItem with a negative value, that does not seem to work (even though it works in the console). Use RemoveItem instead and check for the sign with a conditional.


==Object Creation==
==Object Creation==
Anonymous user

Navigation menu