Jump to content

Some seriuos errors in my first mod


Recommended Posts

Hi I'm working on my first mod and I'm really close to the release but Ive got a problem.

Sometimes, int testing, (most likely randomly) the screen goes black and the log spams this error:

Quote

[LOG 18:20:54.358] Occlusion area test is NAN! Args 1.08845767057814 1.31756421115658 NaN
[LOG 18:20:54.358] part1: NaN
[LOG 18:20:54.358] part2: NaN
[LOG 18:20:54.359] part3: NaN
[LOG 18:20:54.360] Look rotation viewing vector is zero
[LOG 18:20:54.360] Look rotation viewing vector is zero

What can cause this problem? I don't do anything with the camera.

Link to comment
Share on other sites

Hi all I think I've figured out what's causing the problem.

I'm adding a PartModule to my part  in flight, that I've loaded up from a config file, but when I try put Science lab module in, it throws this exception:

Quote

[EXC 17:03:14.807] NullReferenceException: Object reference not set to an instance of an object
    ModuleScienceLab.updateModuleUI ()
    ModuleScienceLab.onPartActionUI (.Part p)
    EventData`1[Part].Fire (.Part data)
    UIPartActionWindow.CreatePartList (Boolean clearFirst)
    UIPartActionWindow.UpdateWindow ()
    UIPartActionController.UpdateActiveWindows ()
    UIPartActionController.UpdateFlight ()
    UIPartActionController.Update ()

I tried  this, but it's just don't want to work.

Any ideas?

 

This is the code:

Quote

 foreach (ConfigNode n in m.moduleconfs)
            {
                var pm = part.AddModule(n.GetValue("name"));

                Debug.Log(n.GetValue("name") + " is being added from: " + n.name);

                if (Awaken(pm))
                {
                    pm.Load(n);
                }
                
            }

 

Edited by mbalint
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...