Jump to content

Papyrus log spaming: Non Object


Recommended Posts

Posted

Greetings all,

 

I've tried so hard to remove this problem from my scripts... but it won't work >.< I don't know why and it gets worse and worse

Here is a realy cute example:

001| Scriptname FWChildActor extends Actor conditional
.......
664|  Event OnUpdateGameTime()
665|      if self
666|          if self.GetLeveledActorBase()
667|              ......
668|          endif
669|      endif
670|  endEvent
 
When I run my mod now, it says:
[08/02/2015 - 07:39:23PM] ERROR: Unable to call GetLeveledActorBase - no native object bound to the script object, or object is of incorrect type
stack:
[ (FF000D9F)].fwchildactor.GetLeveledActorBase() - "<native>" Line ?
[ (FF000D9F)].fwchildactor.OnUpdateGameTime() - "FWChildActor.psc" Line 666

 

 
the "if self" part was made to prevent this error, but it won't work...
In line 666 it says, that self is a non-object ... but in the line above I've testet it, if it's non...
Btw: I've also tried "if self != none"
 
Why does this happen? Is my mod to script heavy?
Posted

You try with a cast.

If Self as Actor
...
Posted

http://www.creationkit.com/GetType_-_Form

try

if self.GetType() == 62 (the 62 is a guess for actor)

 

endif

 

Woot? Why it is working?

I tried many things, but whenever i made a function call, it sais "failed to call RegisterForUpdate on a non-object" .... but well, it's working (for now) :)

Thanks alot!

 

I will drop back, when some problems appear again.

BUt may I ask, why this is happening? It is an actor, it's a actor script, the script was added to an actor, .... everything says actor, but why I have to ask if the type is an actor?

Posted

Because an Actor can be an ObjectReference (very common)

 

But also another few items like:

A "Character" (63)

A "NPC" (43)

 

Posted

 

http://www.creationkit.com/GetType_-_Form

try

if self.GetType() == 62 (the 62 is a guess for actor)

 

endif

 

Woot? Why it is working?

I tried many things, but whenever i made a function call, it sais "failed to call RegisterForUpdate on a non-object" .... but well, it's working (for now) :)

Thanks alot!

 

I will drop back, when some problems appear again.

BUt may I ask, why this is happening? It is an actor, it's a actor script, the script was added to an actor, .... everything says actor, but why I have to ask if the type is an actor?

 

Because everything is a form, form stuff works on anything except primitive types like int. none is nothing more than the form with the id 0, and if self is just the check if the form is the form with the form 0. Because 0 is false and everything else is true on the check.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...