Difference between revisions of "User:DavidJCobb/Miscellany"
Jump to navigation
Jump to search
→Scripting: If you're having trouble with updating functions that have optional arguments and are called cross-script, here ya go. Ain't Papyrus fun?
imported>DavidJCobb |
imported>DavidJCobb (→Scripting: If you're having trouble with updating functions that have optional arguments and are called cross-script, here ya go. Ain't Papyrus fun?) |
||
Line 33: | Line 33: | ||
As for other kinds of references? I'll look into that later. | As for other kinds of references? I'll look into that later. | ||
=== Issues with optional function arguments === | |||
:''Source:'' [http://www.gamesas.com/papyrus-functions-with-optional-arguments-t334901.html '''gamesas:''' Papyrus functions with optional arguments] | |||
When you compile a function with optional script arguments, the argument data is updated for the containing script only. If other scripts make cross-script calls to your function, those functions must be recompiled in order for their calls to work properly. Otherwise... | |||
* If you just added the optional arguments, the other scripts will be unaware of them unless recompiled; you will receive Papyrus errors whining about an "incorrect number of arguments passed." | |||
* If you changed the optional arguments' default values, the other scripts will use the old default values until recompiled. | |||
== Papyrus errors == | == Papyrus errors == |