Having a bit of a conundrum here. So i'm working on an addon for Hideous Destructor to add in a way to repair armor. Been working on trying to get the basic functionality working first, such as drawing the text for it on the screen, but i'm running into something that I can't quite figure out.
https://pastebin.com/ZKkUHHqF
The specific problem seems to be this function here
Code: Select all
override void DrawHUDStuff(HDStatusBar sb,HDWeapon hdw,HDPlayerPawn hpl){
if(!thisarmour||thisarmour.mags.size()<1)return;
sb.beginhud(forcescaled:true);
thisarmour.DrawHUDStuff(sb,self,hpl);
sb.beginhud(forcescaled:false);
}
Code: Select all
thisarmour.DrawHUDStuff(sb,self,hpl);
It crashes on load with this:
Code: Select all
Script error, "HidDest_ArmorPatchKit.pk3:zscript" line 99: Cannot convert Pointer<Class<HDArmorFixerer>> to Pointer<Class<MagManager>>
I've been spending a good while trying to wind my way backwards through the code to figure out what's going on. The problem is that the specific line up above thinks that i'm trying to tap HD's MagManager into my armor fixerer as a self, and the pointers can't convert. The thing is, I cannot work out for the life of me what exactly in the code is causing this to happen. It's not inheiriting from MagManager anywhere I can see. I'm hoping someone can help me see what i'm missing here.