Jump to content

Welcome to LoversLab
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!

useful community scripts to start mods with


  • Please log in to reply
182 replies to this topic

#181
Puuk

Puuk

    Member

  • Members
  • PipPipPip
  • 103 posts

 

Yes, my code looks almost similar to yours. Only difference is that at "do whatever with me" part I have a function call with "me"-reference as parameter. And that part doesn't seem to be the problem, because after this happends maybe two times everything starts to work without any spam to console.


It sounds like something hasn't fully initialized. Maybe the script could check for some valid condition before calling the function.

 

 

Yeah I just added IsReference check before calling function and now it seems to work nice and quiet. I guess GetFirstRef isn't that reliable after all.


  • 0

AdBot

AdBot
  • Advert

#182
movomo

movomo

    maniac

  • Contributor
  • PipPipPipPipPip
  • 2,199 posts

 

 

Yes, my code looks almost similar to yours. Only difference is that at "do whatever with me" part I have a function call with "me"-reference as parameter. And that part doesn't seem to be the problem, because after this happends maybe two times everything starts to work without any spam to console.


It sounds like something hasn't fully initialized. Maybe the script could check for some valid condition before calling the function.

 

 

Yeah I just added IsReference check before calling function and now it seems to work nice and quiet. I guess GetFirstRef isn't that reliable after all.

 

 

Puuk, try waiting one or more frames after the token is added to the actor and then try getContainer again? It may help.


  • 0

#183
Puuk

Puuk

    Member

  • Members
  • PipPipPip
  • 103 posts

I was actually so baffled by this issue that I forgot I meant to do something completely else. However it was good to know in advance what to expect from these tokens.


  • 0