Need help with an assembly [SOLVED]

Started by Leonapp, March 11, 2017, 06:57:37 AM

Previous topic - Next topic

Leonapp

I have bee trying to create an incident that spawns a pawn in the world. Kinda like ThrumboPass. I have made a Assembly and I have made a xml fir the incident. But I keep getting one error and I dont know why. "Could not find a type named IncidentWorker_Slimequeens". I have the incident xml with the incident and an assembly with no errors...

I am a noob coder when it comes to assemblies. I started working with them yesterday but I have managed to create one without errors in sharp develop. I just dont get why I get the error in Rimworld...

Assembly: http://pastebin.com/00KMCVAM
Xml: http://pastebin.com/mfXVnLip
Error I am getting: http://pastebin.com/bFMTbuaA

RawCode

you forgot about namespace - "IncidentWorker_Slimequeens" in your case*


*don't make such namespaces bro


Leonapp

#2
Quote from: RawCode on March 12, 2017, 11:04:56 AM
you forgot about namespace - "IncidentWorker_Slimequeens" in your case*


*don't make such namespaces bro
I didnt have that namespace at first. I simply had L-Slimes. But I have just been testing around to see if anything work... And where did I forgot to put the namespace?

RawCode


Leonapp

Quote from: RawCode on March 12, 2017, 08:45:02 PM
in your XML
Can you be more specifik? I have checked other xmls and they dont use namespace in theirs. They use incident worker like I did...

RawCode

they don't have because native (build in) types are loaded in separate manner.
all mod added types must have namespace definition in front of each type definition.

Leonapp

Okay makes sense. How should I do it? I can check some mods xmls but incase I dont find anything, can you give an example?

RawCode


Leonapp

Thank you a lot, it works. To describe more of the solution:
At first I wrote
<workerClass>IncidentWorker_Slimequeens</workerClass>

But what you need is to put the namespace as well before like this
<workerClass>MyNameSpace.IncidentWorker_Slimequeens</workerClass>