Jump to content

Need some help with C#


eclips3d

Recommended Posts

I just made my first mod and I was trying to implement a NMM installer written in C#; I've had no experience with C# in the past so I used this guide to guide me along. I thought I was all done but when I tried running it from NMM it gave me an error, I have no idea what it means or how to fix it so if anyone could help me out I'd really appreciate it. You can download my mod in the nexus page under main category of the files tab (it's version 1.3.0).
Link to comment
Share on other sites

Shoul've thought of that, sorry :P

I get this message when I try to activate the mod via NMM: http://i45.tinypic.com/2upz2h3.png

 

Hi, I don't know how strict you used the guide, but one of the first error-candidates I see is the

InstallForm = CreateCustomForm();

in the CreateInstallForm method.

 

If you don't have a CreateCustomForm method then the InstallForm object will be null and it would raise your error.

Try InstallForm = new Form(); instead.

 

This is just guessing, I am at work at the moment so I can not check out the problem in detail. I will do this when I am at home.

Edited by Fenriks
Link to comment
Share on other sites

Really? Beacause evry time I try it I get the same error. Maybe you downloaded the wrong version? It's v1.3.0. In any case, I rebuilt the script from the ground up and I think I found the culprit, it had something to do with the "InstallFileFromFomod" command. If I have any more problems I'll post again. Thanks for your help!
Link to comment
Share on other sites

You are right. I downloaded v1.2.0. I feel so ashamed now...

 

Are you sure about the InstallFileFromFomod command? The exception says that the error was thrown in the method CreateInstallForm, the InstallFileFromFomod command only exists in the PerformCustomInstall method.

Link to comment
Share on other sites

So I investigated a little further and it seems that the problem is somewhere in the setting of the background image:

BackgroundPicture.Image = GetImageFromFomod("fomod/Main.png");

 

But I have no idea what the exact problem is, this happens in the very deep of .Net reflection...

Link to comment
Share on other sites

The error was in fact the "InstallFileFromFomod" command. I have no idea why, but I fixed it. Check it out if you want and tell me what you think. Thanks for helping me out!
Link to comment
Share on other sites

  • Recently Browsing   0 members

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