"op_drop_obj: can't match program to sid"

Sduibek

Creator of Fallout Fixt
Moderator
Modder
Does anyone know what this error means in the error logs? It happens sometimes from my code that checks & drops them if player is holding explosives.

This probably isn't needed in Fo2 engine at all since the functionality is included, but this didn't used to give an error so I'm confused why it's giving an error now.

Code:
Script Error: scripts\obj_dude.int: op_drop_obj: can't match program to sid
And here's the drop code:
Code:
		if critter_inven_obj(dude_obj, 2) > 0 then begin
			IDH2 := obj_pid(critter_inven_obj(dude_obj, 2));
			if IDH2 == 206 then begin
				set_global_var(354, 1);
				drop_obj(critter_inven_obj(dude_obj, 2));
			end
			else begin
				if IDH2 == 209 then begin
					set_global_var(354, 1);
					drop_obj(critter_inven_obj(dude_obj, 2));
				end
			end
		end
		if critter_inven_obj(dude_obj, 1) > 0 then begin
			IDH1 := obj_pid(critter_inven_obj(dude_obj, 1));
			if IDH1 == 206 then begin
				set_global_var(354, 1);
				drop_obj(critter_inven_obj(dude_obj, 1));
			end
			else begin
				if IDH1 == 209 then begin
					set_global_var(354, 1);
					drop_obj(critter_inven_obj(dude_obj, 1));
				end
			end
		end
 
That's very strange error. Seem to be happening when the program can't find it's script struct, or it's associated object.
Did it worked in FO1? Are you using FO2 engine, right? What version of sfall you are using (if any) ?
 
Oh... in this case only thing I can recommend is to add check that "critter_inven_obj(dude_obj, 1)" actually returns non-zero value.
 
Okay, thank you.

I thought about it more and I think it's basically the game getting pissed about my "drop explosives from the active hand" code. I think it's trying to initiate combat (the default when you drop ticking explosives) but the automated dropping overrides the hard-coded dropping so the hard-coded dropping then throws an error.

Just a theory :shrug: I'm not too worried about it.
 
Back
Top