Exception Parsing DLL Modding Error

Started by Kilroy232, March 13, 2015, 02:27:11 AM

Previous topic - Next topic

Kilroy232

So this is my first really crack at using C# to mod the game. I the tutorial posted as best I could and the C++ that I learned in university.

I thought I had everything right but I am getting an error I am not familiar with... I can post source code if necessary.
Image of the error message is bellow

Edit: Sorry I keep posting after work and I am really tired so I am not thinking this through 100%

XML Files: https://www.dropbox.com/s/7153cudo5397vs6/Turrets%20Pack.zip?dl=0
I am trying to mimic the action preformed when you research gun turret cooling but with turrets that have been added via mod.

[attachment deleted due to age]

Rikiki

Could you provide the project code please? Would be easier. :)
If you need, M&Co. Common mod uses the callback mechanism to add recipes when research is finished.

skullywag

Could also grab my omniturrets mod. It has all you need .
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Haplo

That looks like you have set the Class as an Action.
This position in your XML requires an Action as an entry. But I think that, what you've set there is a class. Take a look at the original and compare what is entered there with what you've entered.

Kilroy232

I am just posting the source here for the others to look at.
Haplo what you are saying makes sense and I will make sure to have a look at that and see if I have done what you have outlined.

dropbox:
https://www.dropbox.com/s/ldo0sps6pt93o34/TurretPackResearchMods.zip?dl=0

Rikiki

Wow, I am maybe bad but I can't read your code with so many imbrications... ;)

Anyway, adding a "static" before your function may be the solution:
public static void ImprovedTurretCooling()

I cannot test it any more as you did not provided the xml def. ???

Kilroy232

#6
Thank you guys :D I just wasn't nearly careful enough about following format and little details, but the most important being that my namespace needed to but "Verse" and it was not.

Rikiki I hope you don't mind too much but I had a look at your code and used that as a bit of a guide

Edit: So I am able to reduce cooldown between bursts and increase the number of shots fired in a burst but things like increasing health claim to be read only and I am just wondering if anyone might know a way to change that.
I uploaded the entire mod with the source code all in one so if you want you can see where I am at : https://www.dropbox.com/s/0wxthsgl52ytrfz/TurretsPack.zip?dl=0

Rikiki

Download link is dead... ::)

QuoteRikiki I hope you don't mind too much but I had a look at your code and used that as a bit of a guide
I am pleased my code is useful for someone else! :D

Kilroy232

Quote from: Rikiki on March 14, 2015, 03:06:35 PM
Download link is dead... ::)

QuoteRikiki I hope you don't mind too much but I had a look at your code and used that as a bit of a guide
I am pleased my code is useful for someone else! :D

I am so sorry, I am clearly not on point here and I thank you for your patience. I updated the link. As for the long line of code, that's the only way I could get it to work.

Rikiki

Sorry but this link is still dead:
QuoteI uploaded the entire mod with the source code all in one so if you want you can see where I am at : https://www.dropbox.com/s/0wxthsgl52ytrfz/TurretsPack.zip?dl=0

You are trying to give a link to your complete project, right? ??? (with xml files, proper folder structure... not only the VS solution with only TPResearchMods.cs)

Edit: nevermind, I saw the link is in the first post... :(

Kilroy232

Quote from: Rikiki on March 14, 2015, 04:47:40 PM
Sorry but this link is still dead:
QuoteI uploaded the entire mod with the source code all in one so if you want you can see where I am at : https://www.dropbox.com/s/0wxthsgl52ytrfz/TurretsPack.zip?dl=0

You are trying to give a link to your complete project, right? ??? (with xml files, proper folder structure... not only the VS solution with only TPResearchMods.cs)

Edit: nevermind, I saw the link is in the first post... :(

Let me know if you got it all okay