Editing Papyrus Runtime Errors

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 70: Line 70:
=== "Cannot call X() on a None object, aborting function call" ===
=== "Cannot call X() on a None object, aborting function call" ===
This error appears when function X, which is non-global, is called on an object variable that is None. Since you cannot call a non-global function on nothing, the call is ignored and the error printed out. If the variable is expected to be None, then you should probably check for None before calling the function on it. Otherwise you should inspect what is going on in the script at that time to see why the variable is None in the first place. See [[FAQ:_My_Script_Doesn%27t_Work!|My_Script_Doesn't_Work]] for some possibilities.
This error appears when function X, which is non-global, is called on an object variable that is None. Since you cannot call a non-global function on nothing, the call is ignored and the error printed out. If the variable is expected to be None, then you should probably check for None before calling the function on it. Otherwise you should inspect what is going on in the script at that time to see why the variable is None in the first place. See [[FAQ:_My_Script_Doesn%27t_Work!|My_Script_Doesn't_Work]] for some possibilities.
In the example below, the placement of a dummy marker failed, so the variable pointing at the marker had a value of None.
<pre>[09/29/2012 - 08:22:05PM] error: Cannot call MoveToNode() on a None object, aborting function call
stack:
[ (FF000E50)].critterMoth.PlaceDummyMarker() - "Critter.psc" Line 351
[ (FF000E50)].critterMoth.BellShapeTranslateToRefAtSpeed() - "Critter.psc" Line 575
[ (FF000E50)].critterMoth.BellShapeTranslateToRefNodeAtSpeedAndGotoState() - "Critter.psc" Line 641
[ (FF000E50)].critterMoth.GoToNewPlant() - "CritterMoth.psc" Line 278
[ (FF000E50)].critterMoth.OnUpdate() - "CritterMoth.psc" Line 138
</pre>
The code at line 351 of "Critter.psc" script, which caused the error was:
<pre>dummyMarker.MoveToNode(arTarget, asTargetNode)</pre>
The error is generated because it is not possible to call function MoveToNode on None.


=== "Unable to call X - no native object bound to the script object, or object is of incorrect type" ===
=== "Unable to call X - no native object bound to the script object, or object is of incorrect type" ===

Please note that all contributions to the CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see CreationKit:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)